Skip to content

Commit

Permalink
support for multiple buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 15, 2022
1 parent 501a0ec commit 9fad377
Show file tree
Hide file tree
Showing 43 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions accelerometer/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ namespace modules {
this.registerEvent(jacdac.AccelerometerEvent.Force8g, handler)
}
}

//% fixedInstance whenUsed weight=1 block="accelerometer1"
export const accelerometer1 = new AccelerometerClient("accelerometer1")
}
1 change: 1 addition & 0 deletions acidity/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="acidity1"
export const acidity1 = new AcidityClient("acidity1")
}
1 change: 1 addition & 0 deletions air-pressure/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="air pressure1"
export const airPressure1 = new AirPressureClient("air Pressure1")
}
1 change: 1 addition & 0 deletions air-quality-index/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="air quality index1"
export const airQualityIndex1 = new AirQualityIndexClient(
"air Quality Index1"
Expand Down
3 changes: 3 additions & 0 deletions button/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,7 @@ namespace modules {
}
//% fixedInstance whenUsed weight=1 block="button1"
export const button1 = new ButtonClient("button1")

//% fixedInstance whenUsed weight=2 block="button2"
export const button2 = new ButtonClient("button2")
}
1 change: 1 addition & 0 deletions color/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ namespace modules {
return values[2] * 100
}
}

//% fixedInstance whenUsed weight=1 block="color1"
export const color1 = new ColorClient("color1")
}
1 change: 1 addition & 0 deletions compass/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="compass1"
export const compass1 = new CompassClient("compass1")
}
1 change: 1 addition & 0 deletions dc-current-measurement/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="dc current measurement1"
export const dcCurrentMeasurement1 = new DcCurrentMeasurementClient(
"dc Current Measurement1"
Expand Down
1 change: 1 addition & 0 deletions dc-voltage-measurement/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="dc voltage measurement1"
export const dcVoltageMeasurement1 = new DcVoltageMeasurementClient(
"dc Voltage Measurement1"
Expand Down
1 change: 1 addition & 0 deletions distance/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="distance1"
export const distance1 = new DistanceClient("distance1")
}
1 change: 1 addition & 0 deletions dmx/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="dmx1"
export const dmx1 = new DmxClient("dmx1")
}
1 change: 1 addition & 0 deletions e-co2/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="e co21"
export const eCO21 = new ECO2Client("e CO21")
}
1 change: 1 addition & 0 deletions flex/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="flex1"
export const flex1 = new FlexClient("flex1")
}
1 change: 1 addition & 0 deletions gyroscope/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ namespace modules {
return values[0]
}
}

//% fixedInstance whenUsed weight=1 block="gyroscope1"
export const gyroscope1 = new GyroscopeClient("gyroscope1")
}
1 change: 1 addition & 0 deletions heart-rate/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="heart rate1"
export const heartRate1 = new HeartRateClient("heart Rate1")
}
1 change: 1 addition & 0 deletions humidity/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="humidity1"
export const humidity1 = new HumidityClient("humidity1")
}
1 change: 1 addition & 0 deletions illuminance/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="illuminance1"
export const illuminance1 = new IlluminanceClient("illuminance1")
}
1 change: 1 addition & 0 deletions light-bulb/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace modules {
return !!values[0]
}
}

//% fixedInstance whenUsed weight=1 block="light bulb1"
export const lightBulb1 = new LightBulbClient("light Bulb1")
}
4 changes: 4 additions & 0 deletions light-level/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="light level1"
export const lightLevel1 = new LightLevelClient("light Level1")

//% fixedInstance whenUsed weight=2 block="light level2"
export const lightLevel2 = new LightLevelClient("light Level2")
}
6 changes: 6 additions & 0 deletions magnetic-field-level/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,14 @@ namespace modules {
this.registerEvent(jacdac.MagneticFieldLevelEvent.Inactive, handler)
}
}

//% fixedInstance whenUsed weight=1 block="magnetic field level1"
export const magneticFieldLevel1 = new MagneticFieldLevelClient(
"magnetic Field Level1"
)

//% fixedInstance whenUsed weight=2 block="magnetic field level2"
export const magneticFieldLevel2 = new MagneticFieldLevelClient(
"magnetic Field Level2"
)
}
1 change: 1 addition & 0 deletions magnetometer/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="magnetometer1"
export const magnetometer1 = new MagnetometerClient("magnetometer1")
}
1 change: 1 addition & 0 deletions motion/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ namespace modules {
this.registerEvent(jacdac.MotionEvent.Movement, handler)
}
}

//% fixedInstance whenUsed weight=1 block="motion1"
export const motion1 = new MotionClient("motion1")
}
4 changes: 4 additions & 0 deletions potentiometer/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="potentiometer1"
export const potentiometer1 = new PotentiometerClient("potentiometer1")

//% fixedInstance whenUsed weight=2 block="potentiometer2"
export const potentiometer2 = new PotentiometerClient("potentiometer2")
}
1 change: 1 addition & 0 deletions power/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="power1"
export const power1 = new PowerClient("power1")
}
1 change: 1 addition & 0 deletions pulse-oximeter/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="pulse oximeter1"
export const pulseOximeter1 = new PulseOximeterClient("pulse Oximeter1")
}
1 change: 1 addition & 0 deletions rain-gauge/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="rain gauge1"
export const rainGauge1 = new RainGaugeClient("rain Gauge1")
}
1 change: 1 addition & 0 deletions real-time-clock/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="real time clock1"
export const realTimeClock1 = new RealTimeClockClient("real Time Clock1")
}
1 change: 1 addition & 0 deletions reflected-light/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="reflected light1"
export const reflectedLight1 = new ReflectedLightClient("reflected Light1")
}
1 change: 1 addition & 0 deletions relay/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ namespace modules {
return values[0]
}
}

//% fixedInstance whenUsed weight=1 block="relay1"
export const relay1 = new RelayClient("relay1")
}
1 change: 1 addition & 0 deletions rng/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace modules {
return values[0]
}
}

//% fixedInstance whenUsed weight=1 block="rng1"
export const rng1 = new RngClient("rng1")
}
1 change: 1 addition & 0 deletions servo/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="servo1"
export const servo1 = new ServoClient("servo1")
}
1 change: 1 addition & 0 deletions soil-moisture/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="soil moisture1"
export const soilMoisture1 = new SoilMoistureClient("soil Moisture1")
}
1 change: 1 addition & 0 deletions solenoid/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace modules {
return values[0]
}
}

//% fixedInstance whenUsed weight=1 block="solenoid1"
export const solenoid1 = new SolenoidClient("solenoid1")
}
1 change: 1 addition & 0 deletions sound-level/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="sound level1"
export const soundLevel1 = new SoundLevelClient("sound Level1")
}
1 change: 1 addition & 0 deletions speech-synthesis/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="speech synthesis1"
export const speechSynthesis1 = new SpeechSynthesisClient(
"speech Synthesis1"
Expand Down
4 changes: 4 additions & 0 deletions switch/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ namespace modules {
this.registerEvent(jacdac.SwitchEvent.Off, handler)
}
}

//% fixedInstance whenUsed weight=1 block="switch1"
export const switch_1 = new SwitchClient("switch1")

//% fixedInstance whenUsed weight=2 block="switch2"
export const switch_2 = new SwitchClient("switch2")
}
1 change: 1 addition & 0 deletions temperature/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="temperature1"
export const temperature1 = new TemperatureClient("temperature1")
}
1 change: 1 addition & 0 deletions tvoc/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="tvoc1"
export const tvoc1 = new TvocClient("tvoc1")
}
1 change: 1 addition & 0 deletions uv-index/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="uv index1"
export const uvIndex1 = new UvIndexClient("uv Index1")
}
1 change: 1 addition & 0 deletions water-level/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ namespace modules {
this.onReadingChangedBy(threshold / 100, handler)
}
}

//% fixedInstance whenUsed weight=1 block="water level1"
export const waterLevel1 = new WaterLevelClient("water Level1")
}
1 change: 1 addition & 0 deletions weight-scale/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ namespace modules {
)
}
}

//% fixedInstance whenUsed weight=1 block="weight scale1"
export const weightScale1 = new WeightScaleClient("weight Scale1")
}
1 change: 1 addition & 0 deletions wind-direction/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="wind direction1"
export const windDirection1 = new WindDirectionClient("wind Direction1")
}
1 change: 1 addition & 0 deletions wind-speed/client.g.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ namespace modules {
this.onReadingChangedBy(threshold, handler)
}
}

//% fixedInstance whenUsed weight=1 block="wind speed1"
export const windSpeed1 = new WindSpeedClient("wind Speed1")
}

0 comments on commit 9fad377

Please sign in to comment.