node-poweredup 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -11
- package/dist/color.d.ts +7 -0
- package/dist/color.d.ts.map +1 -0
- package/dist/color.js +15 -0
- package/dist/color.js.map +1 -0
- package/dist/consts.d.ts +645 -0
- package/dist/consts.d.ts.map +1 -0
- package/{docs/consts.js.html → dist/consts.js} +74 -127
- package/dist/consts.js.map +1 -0
- package/dist/devices/absolutemotor.d.ts +41 -0
- package/dist/devices/absolutemotor.d.ts.map +1 -0
- package/dist/devices/absolutemotor.js +115 -0
- package/dist/devices/absolutemotor.js.map +1 -0
- package/dist/devices/basicmotor.d.ts +37 -0
- package/dist/devices/basicmotor.d.ts.map +1 -0
- package/dist/devices/basicmotor.js +57 -0
- package/dist/devices/basicmotor.js.map +1 -0
- package/dist/devices/colordistancesensor.d.ts +74 -0
- package/dist/devices/colordistancesensor.d.ts.map +1 -0
- package/dist/devices/colordistancesensor.js +278 -0
- package/dist/devices/colordistancesensor.js.map +1 -0
- package/dist/devices/currentsensor.d.ts +17 -0
- package/dist/devices/currentsensor.d.ts.map +1 -0
- package/dist/devices/currentsensor.js +55 -0
- package/dist/devices/currentsensor.js.map +1 -0
- package/dist/devices/device.d.ts +72 -0
- package/dist/devices/device.d.ts.map +1 -0
- package/dist/devices/device.js +162 -0
- package/dist/devices/device.js.map +1 -0
- package/dist/devices/duplotrainbasecolorsensor.d.ts +20 -0
- package/dist/devices/duplotrainbasecolorsensor.d.ts.map +1 -0
- package/dist/devices/duplotrainbasecolorsensor.js +77 -0
- package/dist/devices/duplotrainbasecolorsensor.js.map +1 -0
- package/dist/devices/duplotrainbasemotor.d.ts +10 -0
- package/dist/devices/duplotrainbasemotor.d.ts.map +1 -0
- package/dist/devices/duplotrainbasemotor.js +12 -0
- package/dist/devices/duplotrainbasemotor.js.map +1 -0
- package/dist/devices/duplotrainbasespeaker.d.ts +27 -0
- package/dist/devices/duplotrainbasespeaker.d.ts.map +1 -0
- package/dist/devices/duplotrainbasespeaker.js +38 -0
- package/dist/devices/duplotrainbasespeaker.js.map +1 -0
- package/dist/devices/duplotrainbasespeedometer.d.ts +17 -0
- package/dist/devices/duplotrainbasespeedometer.d.ts.map +1 -0
- package/dist/devices/duplotrainbasespeedometer.js +34 -0
- package/dist/devices/duplotrainbasespeedometer.js.map +1 -0
- package/dist/devices/hubled.d.ts +28 -0
- package/dist/devices/hubled.d.ts.map +1 -0
- package/dist/devices/hubled.js +58 -0
- package/dist/devices/hubled.js.map +1 -0
- package/dist/devices/light.d.ts +24 -0
- package/dist/devices/light.d.ts.map +1 -0
- package/dist/devices/light.js +44 -0
- package/dist/devices/light.js.map +1 -0
- package/dist/devices/marioaccelerometer.d.ts +18 -0
- package/dist/devices/marioaccelerometer.d.ts.map +1 -0
- package/dist/devices/marioaccelerometer.js +50 -0
- package/dist/devices/marioaccelerometer.js.map +1 -0
- package/dist/devices/mariobarcodesensor.d.ts +18 -0
- package/dist/devices/mariobarcodesensor.d.ts.map +1 -0
- package/dist/devices/mariobarcodesensor.js +58 -0
- package/dist/devices/mariobarcodesensor.js.map +1 -0
- package/dist/devices/mariopantssensor.d.ts +17 -0
- package/dist/devices/mariopantssensor.d.ts.map +1 -0
- package/dist/devices/mariopantssensor.js +34 -0
- package/dist/devices/mariopantssensor.js.map +1 -0
- package/dist/devices/mediumlinearmotor.d.ts +10 -0
- package/dist/devices/mediumlinearmotor.d.ts.map +1 -0
- package/dist/devices/mediumlinearmotor.js +12 -0
- package/dist/devices/mediumlinearmotor.js.map +1 -0
- package/dist/devices/motionsensor.d.ts +17 -0
- package/dist/devices/motionsensor.d.ts.map +1 -0
- package/dist/devices/motionsensor.js +38 -0
- package/dist/devices/motionsensor.js.map +1 -0
- package/dist/devices/movehubmediumlinearmotor.d.ts +10 -0
- package/dist/devices/movehubmediumlinearmotor.d.ts.map +1 -0
- package/dist/devices/movehubmediumlinearmotor.js +12 -0
- package/dist/devices/movehubmediumlinearmotor.js.map +1 -0
- package/dist/devices/movehubtiltsensor.d.ts +17 -0
- package/dist/devices/movehubtiltsensor.d.ts.map +1 -0
- package/dist/devices/movehubtiltsensor.js +36 -0
- package/dist/devices/movehubtiltsensor.js.map +1 -0
- package/dist/devices/piezobuzzer.d.ts +17 -0
- package/dist/devices/piezobuzzer.d.ts.map +1 -0
- package/dist/devices/piezobuzzer.js +27 -0
- package/dist/devices/piezobuzzer.js.map +1 -0
- package/dist/devices/remotecontrolbutton.d.ts +20 -0
- package/dist/devices/remotecontrolbutton.d.ts.map +1 -0
- package/dist/devices/remotecontrolbutton.js +40 -0
- package/dist/devices/remotecontrolbutton.js.map +1 -0
- package/dist/devices/simplemediumlinearmotor.d.ts +10 -0
- package/dist/devices/simplemediumlinearmotor.d.ts.map +1 -0
- package/dist/devices/simplemediumlinearmotor.js +12 -0
- package/dist/devices/simplemediumlinearmotor.js.map +1 -0
- package/dist/devices/tachomotor.d.ts +65 -0
- package/dist/devices/tachomotor.d.ts.map +1 -0
- package/dist/devices/tachomotor.js +161 -0
- package/dist/devices/tachomotor.js.map +1 -0
- package/dist/devices/technic3x3colorlightmatrix.d.ts +22 -0
- package/dist/devices/technic3x3colorlightmatrix.d.ts.map +1 -0
- package/dist/devices/technic3x3colorlightmatrix.js +53 -0
- package/dist/devices/technic3x3colorlightmatrix.js.map +1 -0
- package/dist/devices/techniccolorsensor.d.ts +27 -0
- package/dist/devices/techniccolorsensor.d.ts.map +1 -0
- package/dist/devices/techniccolorsensor.js +71 -0
- package/dist/devices/techniccolorsensor.js.map +1 -0
- package/dist/devices/technicdistancesensor.d.ts +27 -0
- package/dist/devices/technicdistancesensor.d.ts.map +1 -0
- package/dist/devices/technicdistancesensor.js +57 -0
- package/dist/devices/technicdistancesensor.js.map +1 -0
- package/dist/devices/technicforcesensor.d.ts +19 -0
- package/dist/devices/technicforcesensor.d.ts.map +1 -0
- package/dist/devices/technicforcesensor.js +58 -0
- package/dist/devices/technicforcesensor.js.map +1 -0
- package/dist/devices/techniclargeangularmotor.d.ts +13 -0
- package/dist/devices/techniclargeangularmotor.d.ts.map +1 -0
- package/dist/devices/techniclargeangularmotor.js +12 -0
- package/dist/devices/techniclargeangularmotor.js.map +1 -0
- package/dist/devices/techniclargelinearmotor.d.ts +10 -0
- package/dist/devices/techniclargelinearmotor.d.ts.map +1 -0
- package/dist/devices/techniclargelinearmotor.js +12 -0
- package/dist/devices/techniclargelinearmotor.js.map +1 -0
- package/dist/devices/technicmediumangularmotor.d.ts +13 -0
- package/dist/devices/technicmediumangularmotor.d.ts.map +1 -0
- package/dist/devices/technicmediumangularmotor.js +12 -0
- package/dist/devices/technicmediumangularmotor.js.map +1 -0
- package/dist/devices/technicmediumhubaccelerometersensor.d.ts +17 -0
- package/dist/devices/technicmediumhubaccelerometersensor.d.ts.map +1 -0
- package/dist/devices/technicmediumhubaccelerometersensor.js +38 -0
- package/dist/devices/technicmediumhubaccelerometersensor.js.map +1 -0
- package/dist/devices/technicmediumhubgyrosensor.d.ts +17 -0
- package/dist/devices/technicmediumhubgyrosensor.d.ts.map +1 -0
- package/dist/devices/technicmediumhubgyrosensor.js +38 -0
- package/dist/devices/technicmediumhubgyrosensor.js.map +1 -0
- package/dist/devices/technicmediumhubtiltsensor.d.ts +38 -0
- package/dist/devices/technicmediumhubtiltsensor.d.ts.map +1 -0
- package/dist/devices/technicmediumhubtiltsensor.js +103 -0
- package/dist/devices/technicmediumhubtiltsensor.js.map +1 -0
- package/dist/devices/technicsmallangularmotor.d.ts +13 -0
- package/dist/devices/technicsmallangularmotor.d.ts.map +1 -0
- package/dist/devices/technicsmallangularmotor.js +12 -0
- package/dist/devices/technicsmallangularmotor.js.map +1 -0
- package/dist/devices/technicxlargelinearmotor.d.ts +10 -0
- package/dist/devices/technicxlargelinearmotor.d.ts.map +1 -0
- package/dist/devices/technicxlargelinearmotor.js +12 -0
- package/dist/devices/technicxlargelinearmotor.js.map +1 -0
- package/dist/devices/tiltsensor.d.ts +17 -0
- package/dist/devices/tiltsensor.d.ts.map +1 -0
- package/dist/devices/tiltsensor.js +36 -0
- package/dist/devices/tiltsensor.js.map +1 -0
- package/dist/devices/trainmotor.d.ts +10 -0
- package/dist/devices/trainmotor.d.ts.map +1 -0
- package/dist/devices/trainmotor.js +12 -0
- package/dist/devices/trainmotor.js.map +1 -0
- package/dist/devices/voltagesensor.d.ts +17 -0
- package/dist/devices/voltagesensor.d.ts.map +1 -0
- package/dist/devices/voltagesensor.js +59 -0
- package/dist/devices/voltagesensor.js.map +1 -0
- package/dist/hubs/basehub.d.ts +154 -0
- package/dist/hubs/basehub.d.ts.map +1 -0
- package/dist/hubs/basehub.js +383 -0
- package/dist/hubs/basehub.js.map +1 -0
- package/dist/hubs/duplotrainbase.d.ts +18 -0
- package/dist/hubs/duplotrainbase.d.ts.map +1 -0
- package/dist/hubs/duplotrainbase.js +35 -0
- package/dist/hubs/duplotrainbase.js.map +1 -0
- package/dist/hubs/hub.d.ts +20 -0
- package/dist/hubs/hub.d.ts.map +1 -0
- package/dist/hubs/hub.js +44 -0
- package/dist/hubs/hub.js.map +1 -0
- package/dist/hubs/lpf2hub.d.ts +46 -0
- package/dist/hubs/lpf2hub.d.ts.map +1 -0
- package/{docs/hubs_lpf2hub.js.html → dist/hubs/lpf2hub.js} +23 -103
- package/dist/hubs/lpf2hub.js.map +1 -0
- package/dist/hubs/mario.d.ts +18 -0
- package/dist/hubs/mario.d.ts.map +1 -0
- package/dist/hubs/mario.js +31 -0
- package/dist/hubs/mario.js.map +1 -0
- package/dist/hubs/movehub.d.ts +19 -0
- package/dist/hubs/movehub.d.ts.map +1 -0
- package/dist/hubs/movehub.js +46 -0
- package/dist/hubs/movehub.js.map +1 -0
- package/dist/hubs/remotecontrol.d.ts +18 -0
- package/dist/hubs/remotecontrol.d.ts.map +1 -0
- package/dist/hubs/remotecontrol.js +37 -0
- package/dist/hubs/remotecontrol.js.map +1 -0
- package/dist/hubs/technicmediumhub.d.ts +18 -0
- package/dist/hubs/technicmediumhub.d.ts.map +1 -0
- package/dist/hubs/technicmediumhub.js +42 -0
- package/dist/hubs/technicmediumhub.js.map +1 -0
- package/dist/hubs/technicsmallhub.d.ts +19 -0
- package/dist/hubs/technicsmallhub.d.ts.map +1 -0
- package/dist/hubs/technicsmallhub.js +41 -0
- package/dist/hubs/technicsmallhub.js.map +1 -0
- package/dist/hubs/wedo2smarthub.d.ts +39 -0
- package/dist/hubs/wedo2smarthub.d.ts.map +1 -0
- package/dist/hubs/wedo2smarthub.js +186 -0
- package/dist/hubs/wedo2smarthub.js.map +1 -0
- package/dist/index-browser.d.ts +2 -0
- package/dist/index-browser.d.ts.map +1 -0
- package/dist/index-browser.js +96 -0
- package/dist/index-browser.js.map +1 -0
- package/dist/index-node.d.ts +50 -0
- package/dist/index-node.d.ts.map +1 -0
- package/dist/index-node.js +50 -0
- package/dist/index-node.js.map +1 -0
- package/dist/interfaces.d.ts +24 -0
- package/dist/interfaces.d.ts.map +1 -0
- package/dist/interfaces.js +2 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/nobleabstraction.d.ts +27 -0
- package/dist/nobleabstraction.d.ts.map +1 -0
- package/dist/nobleabstraction.js +121 -0
- package/dist/nobleabstraction.js.map +1 -0
- package/dist/node/color.js +2 -29
- package/dist/node/color.js.map +1 -1
- package/dist/node/commands.d.ts +299 -0
- package/dist/node/commands.js +672 -0
- package/dist/node/commands.js.map +1 -0
- package/dist/node/connection.d.ts +187 -0
- package/dist/node/connection.js +478 -0
- package/dist/node/connection.js.map +1 -0
- package/dist/node/consts.js +57 -60
- package/dist/node/consts.js.map +1 -1
- package/dist/node/devices/absolutemotor.d.ts +0 -1
- package/dist/node/devices/absolutemotor.js +14 -41
- package/dist/node/devices/absolutemotor.js.map +1 -1
- package/dist/node/devices/basicmotor.d.ts +3 -3
- package/dist/node/devices/basicmotor.js +6 -33
- package/dist/node/devices/basicmotor.js.map +1 -1
- package/dist/node/devices/colordistancesensor.d.ts +4 -5
- package/dist/node/devices/colordistancesensor.js +11 -38
- package/dist/node/devices/colordistancesensor.js.map +1 -1
- package/dist/node/devices/currentsensor.d.ts +0 -1
- package/dist/node/devices/currentsensor.js +7 -34
- package/dist/node/devices/currentsensor.js.map +1 -1
- package/dist/node/devices/device.d.ts +4 -7
- package/dist/node/devices/device.js +3 -30
- package/dist/node/devices/device.js.map +1 -1
- package/dist/node/devices/duplotrainbasecolorsensor.d.ts +0 -1
- package/dist/node/devices/duplotrainbasecolorsensor.js +9 -36
- package/dist/node/devices/duplotrainbasecolorsensor.js.map +1 -1
- package/dist/node/devices/duplotrainbasemotor.js +3 -30
- package/dist/node/devices/duplotrainbasemotor.js.map +1 -1
- package/dist/node/devices/duplotrainbasespeaker.js +5 -32
- package/dist/node/devices/duplotrainbasespeaker.js.map +1 -1
- package/dist/node/devices/duplotrainbasespeedometer.d.ts +0 -1
- package/dist/node/devices/duplotrainbasespeedometer.js +7 -34
- package/dist/node/devices/duplotrainbasespeedometer.js.map +1 -1
- package/dist/node/devices/hubled.js +5 -32
- package/dist/node/devices/hubled.js.map +1 -1
- package/dist/node/devices/index.d.ts +14 -0
- package/dist/node/devices/index.js +154 -0
- package/dist/node/devices/index.js.map +1 -0
- package/dist/node/devices/led.d.ts +140 -0
- package/dist/node/devices/led.js +295 -0
- package/dist/node/devices/led.js.map +1 -0
- package/dist/node/devices/light.js +5 -32
- package/dist/node/devices/light.js.map +1 -1
- package/dist/node/devices/marioaccelerometer.d.ts +0 -1
- package/dist/node/devices/marioaccelerometer.js +7 -34
- package/dist/node/devices/marioaccelerometer.js.map +1 -1
- package/dist/node/devices/mariobarcodesensor.d.ts +0 -1
- package/dist/node/devices/mariobarcodesensor.js +7 -34
- package/dist/node/devices/mariobarcodesensor.js.map +1 -1
- package/dist/node/devices/mariopantssensor.d.ts +0 -1
- package/dist/node/devices/mariopantssensor.js +7 -34
- package/dist/node/devices/mariopantssensor.js.map +1 -1
- package/dist/node/devices/mediumlinearmotor.js +3 -30
- package/dist/node/devices/mediumlinearmotor.js.map +1 -1
- package/dist/node/devices/motionsensor.d.ts +0 -1
- package/dist/node/devices/motionsensor.js +7 -34
- package/dist/node/devices/motionsensor.js.map +1 -1
- package/dist/node/devices/motor.d.ts +182 -0
- package/dist/node/devices/motor.js +367 -0
- package/dist/node/devices/motor.js.map +1 -0
- package/dist/node/devices/movehubmediumlinearmotor.js +3 -30
- package/dist/node/devices/movehubmediumlinearmotor.js.map +1 -1
- package/dist/node/devices/movehubtiltsensor.d.ts +0 -1
- package/dist/node/devices/movehubtiltsensor.js +7 -34
- package/dist/node/devices/movehubtiltsensor.js.map +1 -1
- package/dist/node/devices/piezobuzzer.js +3 -30
- package/dist/node/devices/piezobuzzer.js.map +1 -1
- package/dist/node/devices/remotecontrolbutton.d.ts +0 -1
- package/dist/node/devices/remotecontrolbutton.js +8 -35
- package/dist/node/devices/remotecontrolbutton.js.map +1 -1
- package/dist/node/devices/sensor.d.ts +305 -0
- package/dist/node/devices/sensor.js +662 -0
- package/dist/node/devices/sensor.js.map +1 -0
- package/dist/node/devices/simplemediumlinearmotor.js +3 -30
- package/dist/node/devices/simplemediumlinearmotor.js.map +1 -1
- package/dist/node/devices/tachomotor.d.ts +0 -1
- package/dist/node/devices/tachomotor.js +14 -41
- package/dist/node/devices/tachomotor.js.map +1 -1
- package/dist/node/devices/technic3x3colorlightmatrix.js +7 -34
- package/dist/node/devices/technic3x3colorlightmatrix.js.map +1 -1
- package/dist/node/devices/techniccolorsensor.d.ts +0 -1
- package/dist/node/devices/techniccolorsensor.js +9 -36
- package/dist/node/devices/techniccolorsensor.js.map +1 -1
- package/dist/node/devices/technicdistancesensor.d.ts +0 -1
- package/dist/node/devices/technicdistancesensor.js +7 -34
- package/dist/node/devices/technicdistancesensor.js.map +1 -1
- package/dist/node/devices/technicforcesensor.d.ts +0 -1
- package/dist/node/devices/technicforcesensor.js +7 -34
- package/dist/node/devices/technicforcesensor.js.map +1 -1
- package/dist/node/devices/techniclargeangularmotor.js +3 -30
- package/dist/node/devices/techniclargeangularmotor.js.map +1 -1
- package/dist/node/devices/techniclargelinearmotor.js +3 -30
- package/dist/node/devices/techniclargelinearmotor.js.map +1 -1
- package/dist/node/devices/technicmediumangularmotor.js +3 -30
- package/dist/node/devices/technicmediumangularmotor.js.map +1 -1
- package/dist/node/devices/technicmediumhubaccelerometersensor.d.ts +0 -1
- package/dist/node/devices/technicmediumhubaccelerometersensor.js +7 -34
- package/dist/node/devices/technicmediumhubaccelerometersensor.js.map +1 -1
- package/dist/node/devices/technicmediumhubgyrosensor.d.ts +0 -1
- package/dist/node/devices/technicmediumhubgyrosensor.js +7 -34
- package/dist/node/devices/technicmediumhubgyrosensor.js.map +1 -1
- package/dist/node/devices/technicmediumhubtiltsensor.d.ts +0 -1
- package/dist/node/devices/technicmediumhubtiltsensor.js +7 -34
- package/dist/node/devices/technicmediumhubtiltsensor.js.map +1 -1
- package/dist/node/devices/technicsmallangularmotor.js +3 -30
- package/dist/node/devices/technicsmallangularmotor.js.map +1 -1
- package/dist/node/devices/technicxlargelinearmotor.js +3 -30
- package/dist/node/devices/technicxlargelinearmotor.js.map +1 -1
- package/dist/node/devices/tiltsensor.d.ts +0 -1
- package/dist/node/devices/tiltsensor.js +7 -34
- package/dist/node/devices/tiltsensor.js.map +1 -1
- package/dist/node/devices/trainmotor.js +3 -30
- package/dist/node/devices/trainmotor.js.map +1 -1
- package/dist/node/devices/voltagesensor.d.ts +0 -1
- package/dist/node/devices/voltagesensor.js +7 -34
- package/dist/node/devices/voltagesensor.js.map +1 -1
- package/dist/node/hub.d.ts +291 -0
- package/dist/node/hub.js +778 -0
- package/dist/node/hub.js.map +1 -0
- package/dist/node/hubs/basehub.d.ts +9 -11
- package/dist/node/hubs/basehub.js +74 -101
- package/dist/node/hubs/basehub.js.map +1 -1
- package/dist/node/hubs/duplotrainbase.d.ts +1 -2
- package/dist/node/hubs/duplotrainbase.js +6 -33
- package/dist/node/hubs/duplotrainbase.js.map +1 -1
- package/dist/node/hubs/hub.d.ts +1 -2
- package/dist/node/hubs/hub.js +8 -35
- package/dist/node/hubs/hub.js.map +1 -1
- package/dist/node/hubs/lpf2hub.d.ts +5 -6
- package/dist/node/hubs/lpf2hub.js +17 -44
- package/dist/node/hubs/lpf2hub.js.map +1 -1
- package/dist/node/hubs/mario.d.ts +1 -2
- package/dist/node/hubs/mario.js +6 -33
- package/dist/node/hubs/mario.js.map +1 -1
- package/dist/node/hubs/movehub.d.ts +1 -2
- package/dist/node/hubs/movehub.js +8 -35
- package/dist/node/hubs/movehub.js.map +1 -1
- package/dist/node/hubs/remotecontrol.d.ts +1 -2
- package/dist/node/hubs/remotecontrol.js +6 -33
- package/dist/node/hubs/remotecontrol.js.map +1 -1
- package/dist/node/hubs/technicmediumhub.d.ts +1 -2
- package/dist/node/hubs/technicmediumhub.js +6 -33
- package/dist/node/hubs/technicmediumhub.js.map +1 -1
- package/dist/node/hubs/technicsmallhub.d.ts +1 -2
- package/dist/node/hubs/technicsmallhub.js +6 -33
- package/dist/node/hubs/technicsmallhub.js.map +1 -1
- package/dist/node/hubs/wedo2smarthub.d.ts +3 -5
- package/dist/node/hubs/wedo2smarthub.js +10 -37
- package/dist/node/hubs/wedo2smarthub.js.map +1 -1
- package/dist/node/index-browser.js +91 -116
- package/dist/node/index-browser.js.map +1 -1
- package/dist/node/index-node.d.ts +1 -0
- package/dist/node/index-node.js +49 -119
- package/dist/node/index-node.js.map +1 -1
- package/dist/node/index.d.ts +31 -0
- package/dist/node/index.js +93 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/index.mjs +0 -0
- package/dist/node/interfaces.d.ts +1 -3
- package/dist/node/interfaces.js +1 -2
- package/dist/node/nobleabstraction.d.ts +0 -2
- package/dist/node/nobleabstraction.js +5 -7
- package/dist/node/nobleabstraction.js.map +1 -1
- package/dist/node/poweredup-browser.d.ts +0 -2
- package/dist/node/poweredup-browser.js +23 -49
- package/dist/node/poweredup-browser.js.map +1 -1
- package/dist/node/poweredup-node.d.ts +0 -2
- package/dist/node/poweredup-node.js +31 -58
- package/dist/node/poweredup-node.js.map +1 -1
- package/dist/node/poweredup.d.ts +83 -0
- package/dist/node/poweredup.js +542 -0
- package/dist/node/poweredup.js.map +1 -0
- package/dist/node/protocol-wedo.d.ts +158 -0
- package/dist/node/protocol-wedo.js +342 -0
- package/dist/node/protocol-wedo.js.map +1 -0
- package/dist/node/protocol.d.ts +340 -0
- package/dist/node/protocol.js +730 -0
- package/dist/node/protocol.js.map +1 -0
- package/dist/node/types.d.ts +408 -0
- package/dist/node/types.js +291 -0
- package/dist/node/types.js.map +1 -0
- package/dist/node/utils.d.ts +1 -2
- package/dist/node/utils.js +14 -26
- package/dist/node/utils.js.map +1 -1
- package/dist/node/webbleabstraction.d.ts +1 -3
- package/dist/node/webbleabstraction.js +3 -7
- package/dist/node/webbleabstraction.js.map +1 -1
- package/dist/poweredup-browser.d.ts +46 -0
- package/dist/poweredup-browser.d.ts.map +1 -0
- package/dist/poweredup-browser.js +210 -0
- package/dist/poweredup-browser.js.map +1 -0
- package/dist/poweredup-node.d.ts +49 -0
- package/dist/poweredup-node.d.ts.map +1 -0
- package/dist/poweredup-node.js +166 -0
- package/dist/poweredup-node.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +90 -0
- package/dist/utils.js.map +1 -0
- package/dist/webbleabstraction.d.ts +27 -0
- package/dist/webbleabstraction.d.ts.map +1 -0
- package/dist/webbleabstraction.js +104 -0
- package/dist/webbleabstraction.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +99 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/AbsoluteMotor.html +242 -0
- package/docs/classes/BaseHub.html +220 -0
- package/docs/classes/BasicMotor.html +201 -0
- package/docs/classes/Color.html +3 -0
- package/docs/classes/ColorDistanceSensor.html +214 -0
- package/docs/classes/CurrentSensor.html +185 -0
- package/docs/classes/Device.html +185 -0
- package/docs/classes/DuploTrainBase.html +233 -0
- package/docs/classes/DuploTrainBaseColorSensor.html +185 -0
- package/docs/classes/DuploTrainBaseMotor.html +201 -0
- package/docs/classes/DuploTrainBaseSpeaker.html +191 -0
- package/docs/classes/DuploTrainBaseSpeedometer.html +185 -0
- package/docs/classes/Hub.html +233 -0
- package/docs/classes/HubLED.html +191 -0
- package/docs/classes/Light.html +195 -0
- package/docs/classes/Mario.html +233 -0
- package/docs/classes/MediumLinearMotor.html +229 -0
- package/docs/classes/MotionSensor.html +185 -0
- package/docs/classes/MoveHub.html +233 -0
- package/docs/classes/MoveHubMediumLinearMotor.html +229 -0
- package/docs/classes/MoveHubTiltSensor.html +185 -0
- package/docs/classes/PiezoBuzzer.html +189 -0
- package/docs/classes/PoweredUP.html +180 -0
- package/docs/classes/RemoteControl.html +233 -0
- package/docs/classes/RemoteControlButton.html +185 -0
- package/docs/classes/SimpleMediumLinearMotor.html +201 -0
- package/docs/classes/TachoMotor.html +229 -0
- package/docs/classes/Technic3x3ColorLightMatrix.html +189 -0
- package/docs/classes/TechnicColorSensor.html +191 -0
- package/docs/classes/TechnicDistanceSensor.html +192 -0
- package/docs/classes/TechnicForceSensor.html +185 -0
- package/docs/classes/TechnicLargeAngularMotor.html +242 -0
- package/docs/classes/TechnicLargeLinearMotor.html +242 -0
- package/docs/classes/TechnicMediumAngularMotor.html +242 -0
- package/docs/classes/TechnicMediumHub.html +233 -0
- package/docs/classes/TechnicMediumHubAccelerometerSensor.html +185 -0
- package/docs/classes/TechnicMediumHubGyroSensor.html +185 -0
- package/docs/classes/TechnicMediumHubTiltSensor.html +197 -0
- package/docs/classes/TechnicSmallAngularMotor.html +242 -0
- package/docs/classes/TechnicXLargeLinearMotor.html +242 -0
- package/docs/classes/TiltSensor.html +185 -0
- package/docs/classes/TrainMotor.html +201 -0
- package/docs/classes/VoltageSensor.html +185 -0
- package/docs/classes/WeDo2SmartHub.html +229 -0
- package/docs/enums/ActionType.html +22 -0
- package/docs/enums/AlertOperation.html +10 -0
- package/docs/enums/AlertPayload.html +6 -0
- package/docs/enums/AlertType.html +10 -0
- package/docs/enums/BLECharacteristic.html +15 -0
- package/docs/enums/BLEManufacturerData.html +8 -0
- package/docs/enums/BLEService.html +7 -0
- package/docs/enums/BrakingStyle.html +7 -0
- package/docs/enums/ButtonState.html +11 -0
- package/docs/enums/Consts.Color.html +25 -0
- package/docs/enums/DeviceType.html +79 -0
- package/docs/enums/DuploTrainBaseSound.html +11 -0
- package/docs/enums/ErrorCode.html +18 -0
- package/docs/enums/Event.html +8 -0
- package/docs/enums/HWNetWorkCommandType.html +28 -0
- package/docs/enums/HWNetworkFamily.html +20 -0
- package/docs/enums/HWNetworkSubFamily.html +16 -0
- package/docs/enums/HubPropertyOperation.html +14 -0
- package/docs/enums/HubPropertyPayload.html +32 -0
- package/docs/enums/HubPropertyReference.html +32 -0
- package/docs/enums/HubType.html +19 -0
- package/docs/enums/IOTypeID.html +30 -0
- package/docs/enums/MarioColor.html +17 -0
- package/docs/enums/MarioPantsType.html +13 -0
- package/docs/enums/MessageType.html +48 -0
- package/docs/enums/ModeInformationType.html +22 -0
- package/docs/enums/PortInputFormatSetupSubCommand.html +14 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +18 -120
- package/docs/modules/Consts.html +1 -0
- package/docs/modules.html +1 -0
- package/docs/variables/ColorNames.html +1 -0
- package/docs/variables/DeviceTypeNames.html +1 -0
- package/docs/variables/HubTypeNames.html +1 -0
- package/docs/variables/isWebBluetooth.html +1 -0
- package/package.json +19 -25
- package/src/color.ts +1 -1
- package/src/consts.ts +16 -16
- package/src/devices/absolutemotor.ts +4 -7
- package/src/devices/basicmotor.ts +4 -8
- package/src/devices/colordistancesensor.ts +8 -14
- package/src/devices/currentsensor.ts +3 -3
- package/src/devices/device.ts +2 -2
- package/src/devices/duplotrainbasecolorsensor.ts +4 -4
- package/src/devices/duplotrainbasemotor.ts +3 -3
- package/src/devices/duplotrainbasespeaker.ts +3 -5
- package/src/devices/duplotrainbasespeedometer.ts +3 -3
- package/src/devices/hubled.ts +3 -5
- package/src/devices/light.ts +4 -6
- package/src/devices/marioaccelerometer.ts +3 -3
- package/src/devices/mariobarcodesensor.ts +3 -3
- package/src/devices/mariopantssensor.ts +3 -3
- package/src/devices/mediumlinearmotor.ts +3 -3
- package/src/devices/motionsensor.ts +3 -3
- package/src/devices/movehubmediumlinearmotor.ts +3 -3
- package/src/devices/movehubtiltsensor.ts +3 -3
- package/src/devices/piezobuzzer.ts +3 -4
- package/src/devices/remotecontrolbutton.ts +3 -3
- package/src/devices/simplemediumlinearmotor.ts +3 -3
- package/src/devices/tachomotor.ts +5 -11
- package/src/devices/technic3x3colorlightmatrix.ts +4 -5
- package/src/devices/techniccolorsensor.ts +4 -5
- package/src/devices/technicdistancesensor.ts +3 -4
- package/src/devices/technicforcesensor.ts +3 -3
- package/src/devices/techniclargeangularmotor.ts +3 -3
- package/src/devices/techniclargelinearmotor.ts +3 -3
- package/src/devices/technicmediumangularmotor.ts +3 -3
- package/src/devices/technicmediumhubaccelerometersensor.ts +3 -3
- package/src/devices/technicmediumhubgyrosensor.ts +3 -3
- package/src/devices/technicmediumhubtiltsensor.ts +6 -9
- package/src/devices/technicsmallangularmotor.ts +3 -3
- package/src/devices/technicxlargelinearmotor.ts +3 -3
- package/src/devices/tiltsensor.ts +3 -3
- package/src/devices/trainmotor.ts +3 -3
- package/src/devices/voltagesensor.ts +3 -3
- package/src/hubs/basehub.ts +42 -51
- package/src/hubs/duplotrainbase.ts +5 -5
- package/src/hubs/hub.ts +5 -5
- package/src/hubs/lpf2hub.ts +4 -7
- package/src/hubs/mario.ts +5 -5
- package/src/hubs/movehub.ts +5 -5
- package/src/hubs/remotecontrol.ts +5 -5
- package/src/hubs/technicmediumhub.ts +5 -5
- package/src/hubs/technicsmallhub.ts +5 -5
- package/src/hubs/wedo2smarthub.ts +7 -9
- package/src/index-browser.ts +46 -46
- package/src/index-node.ts +47 -46
- package/src/interfaces.ts +2 -2
- package/src/nobleabstraction.ts +10 -10
- package/src/poweredup-browser.ts +15 -19
- package/src/poweredup-node.ts +15 -22
- package/src/utils.ts +1 -1
- package/src/webbleabstraction.ts +3 -3
- package/tsconfig.tsbuildinfo +1 -0
- package/typedoc.json +14 -0
- package/.jsdoc.json +0 -40
- package/abandonware-noble.d.ts +0 -129
- package/dist/browser/poweredup.js +0 -3
- package/dist/browser/poweredup.js.LICENSE.txt +0 -8
- package/dist/browser/poweredup.js.map +0 -1
- package/docs/AbsoluteMotor.html +0 -2008
- package/docs/BaseHub.html +0 -1391
- package/docs/BasicMotor.html +0 -1459
- package/docs/ColorDistanceSensor.html +0 -3025
- package/docs/CurrentSensor.html +0 -1022
- package/docs/Device.html +0 -841
- package/docs/DuploTrainBase.html +0 -2092
- package/docs/DuploTrainBaseColorSensor.html +0 -1509
- package/docs/DuploTrainBaseMotor.html +0 -1479
- package/docs/DuploTrainBaseSpeaker.html +0 -1193
- package/docs/DuploTraniBaseSpeedometer.html +0 -871
- package/docs/Hub.html +0 -7451
- package/docs/HubLED.html +0 -1239
- package/docs/LPF2Hub.html +0 -2066
- package/docs/Light.html +0 -1239
- package/docs/Mario.html +0 -2092
- package/docs/MarioAccelerometer.html +0 -1215
- package/docs/MarioBarcodeSensor.html +0 -1215
- package/docs/MarioPantsSensor.html +0 -1022
- package/docs/MediumLinearMotor.html +0 -1357
- package/docs/MotionSensor.html +0 -1022
- package/docs/MoveHub.html +0 -2092
- package/docs/MoveHubMediumLinearMotor.html +0 -1357
- package/docs/MoveHubTiltSensor.html +0 -1045
- package/docs/PiezoBuzzer.html +0 -1057
- package/docs/PoweredUP.html +0 -4371
- package/docs/RemoteControl.html +0 -2092
- package/docs/RemoteControlButton.html +0 -1022
- package/docs/SimpleMediumLinearMotor.html +0 -871
- package/docs/TachoMotor.html +0 -2620
- package/docs/Technic3x3ColorLightMatrix.html +0 -1037
- package/docs/TechnicColorSensor.html +0 -1525
- package/docs/TechnicDistanceSensor.html +0 -1401
- package/docs/TechnicForceSensor.html +0 -1316
- package/docs/TechnicLargeAngularMotor.html +0 -2028
- package/docs/TechnicLargeLinearMotor.html +0 -2028
- package/docs/TechnicMediumAngularMotor.html +0 -2028
- package/docs/TechnicMediumHub.html +0 -2092
- package/docs/TechnicMediumHubAccelerometerSensor.html +0 -1068
- package/docs/TechnicMediumHubGyroSensor.html +0 -1068
- package/docs/TechnicMediumHubTiltSensor.html +0 -1696
- package/docs/TechnicSmallAngularMotor.html +0 -2028
- package/docs/TechnicXLargeLinearMotor.html +0 -2028
- package/docs/TiltSensor.html +0 -1045
- package/docs/TrainMotor.html +0 -1479
- package/docs/VoltageSensor.html +0 -1022
- package/docs/WeDo2SmartHub.html +0 -1887
- package/docs/devices_absolutemotor.js.html +0 -195
- package/docs/devices_basicmotor.js.html +0 -138
- package/docs/devices_colordistancesensor.js.html +0 -361
- package/docs/devices_currentsensor.js.html +0 -132
- package/docs/devices_device.js.html +0 -239
- package/docs/devices_duplotrainbasecolorsensor.js.html +0 -154
- package/docs/devices_duplotrainbasemotor.js.html +0 -89
- package/docs/devices_duplotrainbasespeaker.js.html +0 -117
- package/docs/devices_duplotrainbasespeedometer.js.html +0 -111
- package/docs/devices_hubled.js.html +0 -137
- package/docs/devices_light.js.html +0 -123
- package/docs/devices_marioaccelerometer.js.html +0 -127
- package/docs/devices_mariobarcodesensor.js.html +0 -135
- package/docs/devices_mariopantssensor.js.html +0 -111
- package/docs/devices_mediumlinearmotor.js.html +0 -89
- package/docs/devices_motionsensor.js.html +0 -115
- package/docs/devices_movehubmediumlinearmotor.js.html +0 -89
- package/docs/devices_movehubtiltsensor.js.html +0 -113
- package/docs/devices_piezobuzzer.js.html +0 -105
- package/docs/devices_remotecontrolbutton.js.html +0 -117
- package/docs/devices_simplemediumlinearmotor.js.html +0 -89
- package/docs/devices_tachomotor.js.html +0 -244
- package/docs/devices_technic3x3colorlightmatrix.js.html +0 -131
- package/docs/devices_techniccolorsensor.js.html +0 -149
- package/docs/devices_technicdistancesensor.js.html +0 -135
- package/docs/devices_technicforcesensor.js.html +0 -135
- package/docs/devices_techniclargeangularmotor.js.html +0 -89
- package/docs/devices_techniclargelinearmotor.js.html +0 -89
- package/docs/devices_technicmediumangularmotor.js.html +0 -89
- package/docs/devices_technicmediumhubaccelerometersensor.js.html +0 -115
- package/docs/devices_technicmediumhubgyrosensor.js.html +0 -115
- package/docs/devices_technicmediumhubtiltsensor.js.html +0 -183
- package/docs/devices_technicsmallangularmotor.js.html +0 -89
- package/docs/devices_technicxlargelinearmotor.js.html +0 -89
- package/docs/devices_tiltsensor.js.html +0 -113
- package/docs/devices_trainmotor.js.html +0 -89
- package/docs/devices_voltagesensor.js.html +0 -136
- package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docs/global.html +0 -3996
- package/docs/hubs_basehub.js.html +0 -469
- package/docs/hubs_duplotrainbase.js.html +0 -112
- package/docs/hubs_hub.js.html +0 -121
- package/docs/hubs_mario.js.html +0 -108
- package/docs/hubs_movehub.js.html +0 -123
- package/docs/hubs_remotecontrol.js.html +0 -114
- package/docs/hubs_technicmediumhub.js.html +0 -119
- package/docs/hubs_technicsmallhub.js.html +0 -118
- package/docs/hubs_wedo2smarthub.js.html +0 -265
- package/docs/icons/home.svg +0 -4
- package/docs/icons/search.svg +0 -4
- package/docs/poweredup-browser.js.html +0 -292
- package/docs/poweredup-node.js.html +0 -250
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/pagelocation.js +0 -89
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/styles/collapse.css +0 -27
- package/docs/styles/jsdoc-default.css +0 -358
- package/docs/styles/prettify-jsdoc.css +0 -111
- package/docs/styles/prettify-tomorrow.css +0 -132
- package/noble-mac.d.ts +0 -3
|
@@ -1,47 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.PortMap = exports.WeDo2SmartHub = void 0;
|
|
27
|
-
const basehub_1 = require("./basehub");
|
|
28
|
-
const Consts = __importStar(require("../consts"));
|
|
29
|
-
const utils_1 = require("../utils");
|
|
30
|
-
const Debug = require("debug");
|
|
1
|
+
import { BaseHub } from "./basehub";
|
|
2
|
+
import * as Consts from "../consts";
|
|
3
|
+
import { isWebBluetooth } from "../utils";
|
|
4
|
+
import Debug from "debug";
|
|
31
5
|
const debug = Debug("wedo2smarthub");
|
|
32
6
|
/**
|
|
33
7
|
* The WeDo2SmartHub is emitted if the discovered device is a WeDo 2.0 Smart Hub.
|
|
34
8
|
* @class WeDo2SmartHub
|
|
35
9
|
* @extends BaseHub
|
|
36
10
|
*/
|
|
37
|
-
class WeDo2SmartHub extends
|
|
11
|
+
export class WeDo2SmartHub extends BaseHub {
|
|
38
12
|
static IsWeDo2SmartHub(peripheral) {
|
|
39
13
|
return (peripheral.advertisement &&
|
|
40
14
|
peripheral.advertisement.serviceUuids &&
|
|
41
15
|
peripheral.advertisement.serviceUuids.indexOf(Consts.BLEService.WEDO2_SMART_HUB.replace(/-/g, "")) >= 0);
|
|
42
16
|
}
|
|
43
17
|
constructor(device) {
|
|
44
|
-
super(device,
|
|
18
|
+
super(device, PortMap, Consts.HubType.WEDO2_SMART_HUB);
|
|
45
19
|
this._lastTiltX = 0;
|
|
46
20
|
this._lastTiltY = 0;
|
|
47
21
|
debug("Discovered WeDo 2.0 Smart Hub");
|
|
@@ -52,7 +26,7 @@ class WeDo2SmartHub extends basehub_1.BaseHub {
|
|
|
52
26
|
await super.connect();
|
|
53
27
|
await this._bleDevice.discoverCharacteristicsForService(Consts.BLEService.WEDO2_SMART_HUB);
|
|
54
28
|
await this._bleDevice.discoverCharacteristicsForService(Consts.BLEService.WEDO2_SMART_HUB_2);
|
|
55
|
-
if (!
|
|
29
|
+
if (!isWebBluetooth) {
|
|
56
30
|
await this._bleDevice.discoverCharacteristicsForService(Consts.BLEService.WEDO2_SMART_HUB_3);
|
|
57
31
|
await this._bleDevice.discoverCharacteristicsForService(Consts.BLEService.WEDO2_SMART_HUB_4);
|
|
58
32
|
await this._bleDevice.discoverCharacteristicsForService(Consts.BLEService.WEDO2_SMART_HUB_5);
|
|
@@ -67,7 +41,7 @@ class WeDo2SmartHub extends basehub_1.BaseHub {
|
|
|
67
41
|
this._bleDevice.subscribeToCharacteristic(Consts.BLECharacteristic.WEDO2_PORT_TYPE, this._parsePortMessage.bind(this));
|
|
68
42
|
this._bleDevice.subscribeToCharacteristic(Consts.BLECharacteristic.WEDO2_SENSOR_VALUE, this._parseSensorMessage.bind(this));
|
|
69
43
|
this._bleDevice.subscribeToCharacteristic(Consts.BLECharacteristic.WEDO2_BUTTON, this._parseSensorMessage.bind(this));
|
|
70
|
-
if (!
|
|
44
|
+
if (!isWebBluetooth) {
|
|
71
45
|
this._bleDevice.subscribeToCharacteristic(Consts.BLECharacteristic.WEDO2_BATTERY, this._parseBatteryMessage.bind(this));
|
|
72
46
|
this._bleDevice.readFromCharacteristic(Consts.BLECharacteristic.WEDO2_BATTERY, (err, data) => {
|
|
73
47
|
if (data) {
|
|
@@ -84,7 +58,7 @@ class WeDo2SmartHub extends basehub_1.BaseHub {
|
|
|
84
58
|
this._bleDevice.subscribeToCharacteristic("00002a19-0000-1000-8000-00805f9b34fb", this._parseHighCurrentAlert.bind(this));
|
|
85
59
|
}
|
|
86
60
|
this._bleDevice.subscribeToCharacteristic(Consts.BLECharacteristic.WEDO2_HIGH_CURRENT_ALERT, this._parseHighCurrentAlert.bind(this));
|
|
87
|
-
if (!
|
|
61
|
+
if (!isWebBluetooth) {
|
|
88
62
|
this._bleDevice.readFromCharacteristic(Consts.BLECharacteristic.WEDO2_FIRMWARE_REVISION, (err, data) => {
|
|
89
63
|
if (data) {
|
|
90
64
|
this._parseFirmwareRevisionString(data);
|
|
@@ -203,8 +177,7 @@ class WeDo2SmartHub extends basehub_1.BaseHub {
|
|
|
203
177
|
}
|
|
204
178
|
}
|
|
205
179
|
}
|
|
206
|
-
|
|
207
|
-
exports.PortMap = {
|
|
180
|
+
export const PortMap = {
|
|
208
181
|
"A": 1,
|
|
209
182
|
"B": 2,
|
|
210
183
|
"CURRENT_SENSOR": 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wedo2smarthub.js","sourceRoot":"","sources":["../../../src/hubs/wedo2smarthub.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wedo2smarthub.js","sourceRoot":"","sources":["../../../src/hubs/wedo2smarthub.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,KAAK,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAGrC;;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AM,CAAC,CAAC;QAE/C,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;IAEL,CAAC;CAGJ;AAED,MAAM,CAAC,MAAM,OAAO,GAAiC;IACjD,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,cAAc,EAAE,CAAC;IACjB,SAAS,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -1,121 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const motionsensor_1 = require("./devices/motionsensor");
|
|
48
|
-
const movehubmediumlinearmotor_1 = require("./devices/movehubmediumlinearmotor");
|
|
49
|
-
const movehubtiltsensor_1 = require("./devices/movehubtiltsensor");
|
|
50
|
-
const piezobuzzer_1 = require("./devices/piezobuzzer");
|
|
51
|
-
const remotecontrolbutton_1 = require("./devices/remotecontrolbutton");
|
|
52
|
-
const simplemediumlinearmotor_1 = require("./devices/simplemediumlinearmotor");
|
|
53
|
-
const techniccolorsensor_1 = require("./devices/techniccolorsensor");
|
|
54
|
-
const technicdistancesensor_1 = require("./devices/technicdistancesensor");
|
|
55
|
-
const technicforcesensor_1 = require("./devices/technicforcesensor");
|
|
56
|
-
const techniclargeangularmotor_1 = require("./devices/techniclargeangularmotor");
|
|
57
|
-
const techniclargelinearmotor_1 = require("./devices/techniclargelinearmotor");
|
|
58
|
-
const technicsmallangularmotor_1 = require("./devices/technicsmallangularmotor");
|
|
59
|
-
const technicmediumangularmotor_1 = require("./devices/technicmediumangularmotor");
|
|
60
|
-
const technicmediumhubaccelerometersensor_1 = require("./devices/technicmediumhubaccelerometersensor");
|
|
61
|
-
const technicmediumhubgyrosensor_1 = require("./devices/technicmediumhubgyrosensor");
|
|
62
|
-
const technicmediumhubtiltsensor_1 = require("./devices/technicmediumhubtiltsensor");
|
|
63
|
-
const technicxlargelinearmotor_1 = require("./devices/technicxlargelinearmotor");
|
|
64
|
-
const technic3x3colorlightmatrix_1 = require("./devices/technic3x3colorlightmatrix");
|
|
65
|
-
const tiltsensor_1 = require("./devices/tiltsensor");
|
|
66
|
-
const trainmotor_1 = require("./devices/trainmotor");
|
|
67
|
-
const voltagesensor_1 = require("./devices/voltagesensor");
|
|
68
|
-
const tachomotor_1 = require("./devices/tachomotor");
|
|
69
|
-
const absolutemotor_1 = require("./devices/absolutemotor");
|
|
70
|
-
const basicmotor_1 = require("./devices/basicmotor");
|
|
71
|
-
const utils_1 = require("./utils");
|
|
1
|
+
import * as Consts from "./consts";
|
|
2
|
+
import { PoweredUP } from "./poweredup-browser";
|
|
3
|
+
import { Color } from "./color";
|
|
4
|
+
import { BaseHub } from "./hubs/basehub";
|
|
5
|
+
import { DuploTrainBase } from "./hubs/duplotrainbase";
|
|
6
|
+
import { Hub } from "./hubs/hub";
|
|
7
|
+
import { Mario } from "./hubs/mario";
|
|
8
|
+
import { MoveHub } from "./hubs/movehub";
|
|
9
|
+
import { RemoteControl } from "./hubs/remotecontrol";
|
|
10
|
+
import { TechnicMediumHub } from "./hubs/technicmediumhub";
|
|
11
|
+
import { WeDo2SmartHub } from "./hubs/wedo2smarthub";
|
|
12
|
+
import { ColorDistanceSensor } from "./devices/colordistancesensor";
|
|
13
|
+
import { CurrentSensor } from "./devices/currentsensor";
|
|
14
|
+
import { Device } from "./devices/device";
|
|
15
|
+
import { DuploTrainBaseColorSensor } from "./devices/duplotrainbasecolorsensor";
|
|
16
|
+
import { DuploTrainBaseMotor } from "./devices/duplotrainbasemotor";
|
|
17
|
+
import { DuploTrainBaseSpeaker } from "./devices/duplotrainbasespeaker";
|
|
18
|
+
import { DuploTrainBaseSpeedometer } from "./devices/duplotrainbasespeedometer";
|
|
19
|
+
import { HubLED } from "./devices/hubled";
|
|
20
|
+
import { Light } from "./devices/light";
|
|
21
|
+
import { MediumLinearMotor } from "./devices/mediumlinearmotor";
|
|
22
|
+
import { MotionSensor } from "./devices/motionsensor";
|
|
23
|
+
import { MoveHubMediumLinearMotor } from "./devices/movehubmediumlinearmotor";
|
|
24
|
+
import { MoveHubTiltSensor } from "./devices/movehubtiltsensor";
|
|
25
|
+
import { PiezoBuzzer } from "./devices/piezobuzzer";
|
|
26
|
+
import { RemoteControlButton } from "./devices/remotecontrolbutton";
|
|
27
|
+
import { SimpleMediumLinearMotor } from "./devices/simplemediumlinearmotor";
|
|
28
|
+
import { TechnicColorSensor } from "./devices/techniccolorsensor";
|
|
29
|
+
import { TechnicDistanceSensor } from "./devices/technicdistancesensor";
|
|
30
|
+
import { TechnicForceSensor } from "./devices/technicforcesensor";
|
|
31
|
+
import { TechnicLargeAngularMotor } from "./devices/techniclargeangularmotor";
|
|
32
|
+
import { TechnicLargeLinearMotor } from "./devices/techniclargelinearmotor";
|
|
33
|
+
import { TechnicSmallAngularMotor } from "./devices/technicsmallangularmotor";
|
|
34
|
+
import { TechnicMediumAngularMotor } from "./devices/technicmediumangularmotor";
|
|
35
|
+
import { TechnicMediumHubAccelerometerSensor } from "./devices/technicmediumhubaccelerometersensor";
|
|
36
|
+
import { TechnicMediumHubGyroSensor } from "./devices/technicmediumhubgyrosensor";
|
|
37
|
+
import { TechnicMediumHubTiltSensor } from "./devices/technicmediumhubtiltsensor";
|
|
38
|
+
import { TechnicXLargeLinearMotor } from "./devices/technicxlargelinearmotor";
|
|
39
|
+
import { Technic3x3ColorLightMatrix } from "./devices/technic3x3colorlightmatrix";
|
|
40
|
+
import { TiltSensor } from "./devices/tiltsensor";
|
|
41
|
+
import { TrainMotor } from "./devices/trainmotor";
|
|
42
|
+
import { VoltageSensor } from "./devices/voltagesensor";
|
|
43
|
+
import { TachoMotor } from "./devices/tachomotor";
|
|
44
|
+
import { AbsoluteMotor } from "./devices/absolutemotor";
|
|
45
|
+
import { BasicMotor } from "./devices/basicmotor";
|
|
46
|
+
import { isWebBluetooth } from "./utils";
|
|
72
47
|
// @ts-ignore
|
|
73
48
|
window.PoweredUP = {
|
|
74
|
-
PoweredUP
|
|
75
|
-
BaseHub
|
|
76
|
-
WeDo2SmartHub
|
|
77
|
-
TechnicMediumHub
|
|
78
|
-
Hub
|
|
79
|
-
RemoteControl
|
|
80
|
-
DuploTrainBase
|
|
49
|
+
PoweredUP,
|
|
50
|
+
BaseHub,
|
|
51
|
+
WeDo2SmartHub,
|
|
52
|
+
TechnicMediumHub,
|
|
53
|
+
Hub,
|
|
54
|
+
RemoteControl,
|
|
55
|
+
DuploTrainBase,
|
|
81
56
|
Consts,
|
|
82
|
-
Color
|
|
83
|
-
ColorDistanceSensor
|
|
84
|
-
Device
|
|
85
|
-
DuploTrainBaseColorSensor
|
|
86
|
-
DuploTrainBaseMotor
|
|
87
|
-
DuploTrainBaseSpeaker
|
|
88
|
-
DuploTrainBaseSpeedometer
|
|
89
|
-
HubLED
|
|
90
|
-
Light
|
|
91
|
-
Mario
|
|
92
|
-
MediumLinearMotor
|
|
93
|
-
MotionSensor
|
|
94
|
-
MoveHub
|
|
95
|
-
MoveHubMediumLinearMotor
|
|
96
|
-
MoveHubTiltSensor
|
|
97
|
-
PiezoBuzzer
|
|
98
|
-
RemoteControlButton
|
|
99
|
-
SimpleMediumLinearMotor
|
|
100
|
-
TechnicColorSensor
|
|
101
|
-
TechnicDistanceSensor
|
|
102
|
-
TechnicForceSensor
|
|
103
|
-
TechnicMediumHubAccelerometerSensor
|
|
104
|
-
TechnicMediumHubGyroSensor
|
|
105
|
-
TechnicMediumHubTiltSensor
|
|
106
|
-
TechnicSmallAngularMotor
|
|
107
|
-
TechnicMediumAngularMotor
|
|
108
|
-
TechnicLargeAngularMotor
|
|
109
|
-
TechnicLargeLinearMotor
|
|
110
|
-
TechnicXLargeLinearMotor
|
|
111
|
-
Technic3x3ColorLightMatrix
|
|
112
|
-
TiltSensor
|
|
113
|
-
TrainMotor
|
|
114
|
-
VoltageSensor
|
|
115
|
-
CurrentSensor
|
|
116
|
-
TachoMotor
|
|
117
|
-
AbsoluteMotor
|
|
118
|
-
BasicMotor
|
|
119
|
-
isWebBluetooth
|
|
57
|
+
Color,
|
|
58
|
+
ColorDistanceSensor,
|
|
59
|
+
Device,
|
|
60
|
+
DuploTrainBaseColorSensor,
|
|
61
|
+
DuploTrainBaseMotor,
|
|
62
|
+
DuploTrainBaseSpeaker,
|
|
63
|
+
DuploTrainBaseSpeedometer,
|
|
64
|
+
HubLED,
|
|
65
|
+
Light,
|
|
66
|
+
Mario,
|
|
67
|
+
MediumLinearMotor,
|
|
68
|
+
MotionSensor,
|
|
69
|
+
MoveHub,
|
|
70
|
+
MoveHubMediumLinearMotor,
|
|
71
|
+
MoveHubTiltSensor,
|
|
72
|
+
PiezoBuzzer,
|
|
73
|
+
RemoteControlButton,
|
|
74
|
+
SimpleMediumLinearMotor,
|
|
75
|
+
TechnicColorSensor,
|
|
76
|
+
TechnicDistanceSensor,
|
|
77
|
+
TechnicForceSensor,
|
|
78
|
+
TechnicMediumHubAccelerometerSensor,
|
|
79
|
+
TechnicMediumHubGyroSensor,
|
|
80
|
+
TechnicMediumHubTiltSensor,
|
|
81
|
+
TechnicSmallAngularMotor,
|
|
82
|
+
TechnicMediumAngularMotor,
|
|
83
|
+
TechnicLargeAngularMotor,
|
|
84
|
+
TechnicLargeLinearMotor,
|
|
85
|
+
TechnicXLargeLinearMotor,
|
|
86
|
+
Technic3x3ColorLightMatrix,
|
|
87
|
+
TiltSensor,
|
|
88
|
+
TrainMotor,
|
|
89
|
+
VoltageSensor,
|
|
90
|
+
CurrentSensor,
|
|
91
|
+
TachoMotor,
|
|
92
|
+
AbsoluteMotor,
|
|
93
|
+
BasicMotor,
|
|
94
|
+
isWebBluetooth
|
|
120
95
|
};
|
|
121
96
|
//# sourceMappingURL=index-browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.js","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-browser.js","sourceRoot":"","sources":["../../src/index-browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,M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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Object.defineProperty(exports, "ColorDistanceSensor", { enumerable: true, get: function () { return colordistancesensor_1.ColorDistanceSensor; } });
|
|
51
|
-
const currentsensor_1 = require("./devices/currentsensor");
|
|
52
|
-
Object.defineProperty(exports, "CurrentSensor", { enumerable: true, get: function () { return currentsensor_1.CurrentSensor; } });
|
|
53
|
-
const device_1 = require("./devices/device");
|
|
54
|
-
Object.defineProperty(exports, "Device", { enumerable: true, get: function () { return device_1.Device; } });
|
|
55
|
-
const duplotrainbasecolorsensor_1 = require("./devices/duplotrainbasecolorsensor");
|
|
56
|
-
Object.defineProperty(exports, "DuploTrainBaseColorSensor", { enumerable: true, get: function () { return duplotrainbasecolorsensor_1.DuploTrainBaseColorSensor; } });
|
|
57
|
-
const duplotrainbasemotor_1 = require("./devices/duplotrainbasemotor");
|
|
58
|
-
Object.defineProperty(exports, "DuploTrainBaseMotor", { enumerable: true, get: function () { return duplotrainbasemotor_1.DuploTrainBaseMotor; } });
|
|
59
|
-
const duplotrainbasespeaker_1 = require("./devices/duplotrainbasespeaker");
|
|
60
|
-
Object.defineProperty(exports, "DuploTrainBaseSpeaker", { enumerable: true, get: function () { return duplotrainbasespeaker_1.DuploTrainBaseSpeaker; } });
|
|
61
|
-
const duplotrainbasespeedometer_1 = require("./devices/duplotrainbasespeedometer");
|
|
62
|
-
Object.defineProperty(exports, "DuploTrainBaseSpeedometer", { enumerable: true, get: function () { return duplotrainbasespeedometer_1.DuploTrainBaseSpeedometer; } });
|
|
63
|
-
const hubled_1 = require("./devices/hubled");
|
|
64
|
-
Object.defineProperty(exports, "HubLED", { enumerable: true, get: function () { return hubled_1.HubLED; } });
|
|
65
|
-
const light_1 = require("./devices/light");
|
|
66
|
-
Object.defineProperty(exports, "Light", { enumerable: true, get: function () { return light_1.Light; } });
|
|
67
|
-
const mediumlinearmotor_1 = require("./devices/mediumlinearmotor");
|
|
68
|
-
Object.defineProperty(exports, "MediumLinearMotor", { enumerable: true, get: function () { return mediumlinearmotor_1.MediumLinearMotor; } });
|
|
69
|
-
const motionsensor_1 = require("./devices/motionsensor");
|
|
70
|
-
Object.defineProperty(exports, "MotionSensor", { enumerable: true, get: function () { return motionsensor_1.MotionSensor; } });
|
|
71
|
-
const movehubmediumlinearmotor_1 = require("./devices/movehubmediumlinearmotor");
|
|
72
|
-
Object.defineProperty(exports, "MoveHubMediumLinearMotor", { enumerable: true, get: function () { return movehubmediumlinearmotor_1.MoveHubMediumLinearMotor; } });
|
|
73
|
-
const movehubtiltsensor_1 = require("./devices/movehubtiltsensor");
|
|
74
|
-
Object.defineProperty(exports, "MoveHubTiltSensor", { enumerable: true, get: function () { return movehubtiltsensor_1.MoveHubTiltSensor; } });
|
|
75
|
-
const piezobuzzer_1 = require("./devices/piezobuzzer");
|
|
76
|
-
Object.defineProperty(exports, "PiezoBuzzer", { enumerable: true, get: function () { return piezobuzzer_1.PiezoBuzzer; } });
|
|
77
|
-
const remotecontrolbutton_1 = require("./devices/remotecontrolbutton");
|
|
78
|
-
Object.defineProperty(exports, "RemoteControlButton", { enumerable: true, get: function () { return remotecontrolbutton_1.RemoteControlButton; } });
|
|
79
|
-
const simplemediumlinearmotor_1 = require("./devices/simplemediumlinearmotor");
|
|
80
|
-
Object.defineProperty(exports, "SimpleMediumLinearMotor", { enumerable: true, get: function () { return simplemediumlinearmotor_1.SimpleMediumLinearMotor; } });
|
|
81
|
-
const techniccolorsensor_1 = require("./devices/techniccolorsensor");
|
|
82
|
-
Object.defineProperty(exports, "TechnicColorSensor", { enumerable: true, get: function () { return techniccolorsensor_1.TechnicColorSensor; } });
|
|
83
|
-
const technicdistancesensor_1 = require("./devices/technicdistancesensor");
|
|
84
|
-
Object.defineProperty(exports, "TechnicDistanceSensor", { enumerable: true, get: function () { return technicdistancesensor_1.TechnicDistanceSensor; } });
|
|
85
|
-
const technicforcesensor_1 = require("./devices/technicforcesensor");
|
|
86
|
-
Object.defineProperty(exports, "TechnicForceSensor", { enumerable: true, get: function () { return technicforcesensor_1.TechnicForceSensor; } });
|
|
87
|
-
const techniclargeangularmotor_1 = require("./devices/techniclargeangularmotor");
|
|
88
|
-
Object.defineProperty(exports, "TechnicLargeAngularMotor", { enumerable: true, get: function () { return techniclargeangularmotor_1.TechnicLargeAngularMotor; } });
|
|
89
|
-
const techniclargelinearmotor_1 = require("./devices/techniclargelinearmotor");
|
|
90
|
-
Object.defineProperty(exports, "TechnicLargeLinearMotor", { enumerable: true, get: function () { return techniclargelinearmotor_1.TechnicLargeLinearMotor; } });
|
|
91
|
-
const technicsmallangularmotor_1 = require("./devices/technicsmallangularmotor");
|
|
92
|
-
Object.defineProperty(exports, "TechnicSmallAngularMotor", { enumerable: true, get: function () { return technicsmallangularmotor_1.TechnicSmallAngularMotor; } });
|
|
93
|
-
const technicmediumangularmotor_1 = require("./devices/technicmediumangularmotor");
|
|
94
|
-
Object.defineProperty(exports, "TechnicMediumAngularMotor", { enumerable: true, get: function () { return technicmediumangularmotor_1.TechnicMediumAngularMotor; } });
|
|
95
|
-
const technicmediumhubaccelerometersensor_1 = require("./devices/technicmediumhubaccelerometersensor");
|
|
96
|
-
Object.defineProperty(exports, "TechnicMediumHubAccelerometerSensor", { enumerable: true, get: function () { return technicmediumhubaccelerometersensor_1.TechnicMediumHubAccelerometerSensor; } });
|
|
97
|
-
const technicmediumhubgyrosensor_1 = require("./devices/technicmediumhubgyrosensor");
|
|
98
|
-
Object.defineProperty(exports, "TechnicMediumHubGyroSensor", { enumerable: true, get: function () { return technicmediumhubgyrosensor_1.TechnicMediumHubGyroSensor; } });
|
|
99
|
-
const technicmediumhubtiltsensor_1 = require("./devices/technicmediumhubtiltsensor");
|
|
100
|
-
Object.defineProperty(exports, "TechnicMediumHubTiltSensor", { enumerable: true, get: function () { return technicmediumhubtiltsensor_1.TechnicMediumHubTiltSensor; } });
|
|
101
|
-
const technicxlargelinearmotor_1 = require("./devices/technicxlargelinearmotor");
|
|
102
|
-
Object.defineProperty(exports, "TechnicXLargeLinearMotor", { enumerable: true, get: function () { return technicxlargelinearmotor_1.TechnicXLargeLinearMotor; } });
|
|
103
|
-
const technic3x3colorlightmatrix_1 = require("./devices/technic3x3colorlightmatrix");
|
|
104
|
-
Object.defineProperty(exports, "Technic3x3ColorLightMatrix", { enumerable: true, get: function () { return technic3x3colorlightmatrix_1.Technic3x3ColorLightMatrix; } });
|
|
105
|
-
const tiltsensor_1 = require("./devices/tiltsensor");
|
|
106
|
-
Object.defineProperty(exports, "TiltSensor", { enumerable: true, get: function () { return tiltsensor_1.TiltSensor; } });
|
|
107
|
-
const trainmotor_1 = require("./devices/trainmotor");
|
|
108
|
-
Object.defineProperty(exports, "TrainMotor", { enumerable: true, get: function () { return trainmotor_1.TrainMotor; } });
|
|
109
|
-
const voltagesensor_1 = require("./devices/voltagesensor");
|
|
110
|
-
Object.defineProperty(exports, "VoltageSensor", { enumerable: true, get: function () { return voltagesensor_1.VoltageSensor; } });
|
|
111
|
-
const tachomotor_1 = require("./devices/tachomotor");
|
|
112
|
-
Object.defineProperty(exports, "TachoMotor", { enumerable: true, get: function () { return tachomotor_1.TachoMotor; } });
|
|
113
|
-
const absolutemotor_1 = require("./devices/absolutemotor");
|
|
114
|
-
Object.defineProperty(exports, "AbsoluteMotor", { enumerable: true, get: function () { return absolutemotor_1.AbsoluteMotor; } });
|
|
115
|
-
const basicmotor_1 = require("./devices/basicmotor");
|
|
116
|
-
Object.defineProperty(exports, "BasicMotor", { enumerable: true, get: function () { return basicmotor_1.BasicMotor; } });
|
|
117
|
-
const utils_1 = require("./utils");
|
|
118
|
-
Object.defineProperty(exports, "isWebBluetooth", { enumerable: true, get: function () { return utils_1.isWebBluetooth; } });
|
|
119
|
-
exports.default = poweredup_node_1.PoweredUP;
|
|
1
|
+
import * as Consts from "./consts";
|
|
2
|
+
export * from "./consts";
|
|
3
|
+
import { PoweredUP } from "./poweredup-node";
|
|
4
|
+
import { Color } from "./color";
|
|
5
|
+
import { BaseHub } from "./hubs/basehub";
|
|
6
|
+
import { DuploTrainBase } from "./hubs/duplotrainbase";
|
|
7
|
+
import { Hub } from "./hubs/hub";
|
|
8
|
+
import { Mario } from "./hubs/mario";
|
|
9
|
+
import { MoveHub } from "./hubs/movehub";
|
|
10
|
+
import { RemoteControl } from "./hubs/remotecontrol";
|
|
11
|
+
import { TechnicMediumHub } from "./hubs/technicmediumhub";
|
|
12
|
+
import { WeDo2SmartHub } from "./hubs/wedo2smarthub";
|
|
13
|
+
import { ColorDistanceSensor } from "./devices/colordistancesensor";
|
|
14
|
+
import { CurrentSensor } from "./devices/currentsensor";
|
|
15
|
+
import { Device } from "./devices/device";
|
|
16
|
+
import { DuploTrainBaseColorSensor } from "./devices/duplotrainbasecolorsensor";
|
|
17
|
+
import { DuploTrainBaseMotor } from "./devices/duplotrainbasemotor";
|
|
18
|
+
import { DuploTrainBaseSpeaker } from "./devices/duplotrainbasespeaker";
|
|
19
|
+
import { DuploTrainBaseSpeedometer } from "./devices/duplotrainbasespeedometer";
|
|
20
|
+
import { HubLED } from "./devices/hubled";
|
|
21
|
+
import { Light } from "./devices/light";
|
|
22
|
+
import { MediumLinearMotor } from "./devices/mediumlinearmotor";
|
|
23
|
+
import { MotionSensor } from "./devices/motionsensor";
|
|
24
|
+
import { MoveHubMediumLinearMotor } from "./devices/movehubmediumlinearmotor";
|
|
25
|
+
import { MoveHubTiltSensor } from "./devices/movehubtiltsensor";
|
|
26
|
+
import { PiezoBuzzer } from "./devices/piezobuzzer";
|
|
27
|
+
import { RemoteControlButton } from "./devices/remotecontrolbutton";
|
|
28
|
+
import { SimpleMediumLinearMotor } from "./devices/simplemediumlinearmotor";
|
|
29
|
+
import { TechnicColorSensor } from "./devices/techniccolorsensor";
|
|
30
|
+
import { TechnicDistanceSensor } from "./devices/technicdistancesensor";
|
|
31
|
+
import { TechnicForceSensor } from "./devices/technicforcesensor";
|
|
32
|
+
import { TechnicLargeAngularMotor } from "./devices/techniclargeangularmotor";
|
|
33
|
+
import { TechnicLargeLinearMotor } from "./devices/techniclargelinearmotor";
|
|
34
|
+
import { TechnicSmallAngularMotor } from "./devices/technicsmallangularmotor";
|
|
35
|
+
import { TechnicMediumAngularMotor } from "./devices/technicmediumangularmotor";
|
|
36
|
+
import { TechnicMediumHubAccelerometerSensor } from "./devices/technicmediumhubaccelerometersensor";
|
|
37
|
+
import { TechnicMediumHubGyroSensor } from "./devices/technicmediumhubgyrosensor";
|
|
38
|
+
import { TechnicMediumHubTiltSensor } from "./devices/technicmediumhubtiltsensor";
|
|
39
|
+
import { TechnicXLargeLinearMotor } from "./devices/technicxlargelinearmotor";
|
|
40
|
+
import { Technic3x3ColorLightMatrix } from "./devices/technic3x3colorlightmatrix";
|
|
41
|
+
import { TiltSensor } from "./devices/tiltsensor";
|
|
42
|
+
import { TrainMotor } from "./devices/trainmotor";
|
|
43
|
+
import { VoltageSensor } from "./devices/voltagesensor";
|
|
44
|
+
import { TachoMotor } from "./devices/tachomotor";
|
|
45
|
+
import { AbsoluteMotor } from "./devices/absolutemotor";
|
|
46
|
+
import { BasicMotor } from "./devices/basicmotor";
|
|
47
|
+
import { isWebBluetooth } from "./utils";
|
|
48
|
+
export default PoweredUP;
|
|
49
|
+
export { PoweredUP, BaseHub, WeDo2SmartHub, TechnicMediumHub, Hub, RemoteControl, DuploTrainBase, Consts, Color, ColorDistanceSensor, Device, DuploTrainBaseColorSensor, DuploTrainBaseMotor, DuploTrainBaseSpeaker, DuploTrainBaseSpeedometer, HubLED, Light, Mario, MediumLinearMotor, MotionSensor, MoveHub, MoveHubMediumLinearMotor, MoveHubTiltSensor, PiezoBuzzer, RemoteControlButton, SimpleMediumLinearMotor, TechnicColorSensor, TechnicDistanceSensor, TechnicForceSensor, TechnicMediumHubAccelerometerSensor, TechnicMediumHubGyroSensor, TechnicMediumHubTiltSensor, TechnicSmallAngularMotor, TechnicMediumAngularMotor, TechnicLargeAngularMotor, TechnicLargeLinearMotor, TechnicXLargeLinearMotor, Technic3x3ColorLightMatrix, TiltSensor, TrainMotor, VoltageSensor, CurrentSensor, TachoMotor, AbsoluteMotor, BasicMotor, isWebBluetooth };
|
|
120
50
|
//# sourceMappingURL=index-node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.js","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-node.js","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC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,EAC1B,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,EACjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* node-poweredup
|
|
3
|
+
*
|
|
4
|
+
* A Javascript module to interface with LEGO Powered Up components.
|
|
5
|
+
*/
|
|
6
|
+
import { PoweredUp, PoweredUpWeb } from "./poweredup";
|
|
7
|
+
import * as Consts from "./types";
|
|
8
|
+
export { PoweredUp, PoweredUpWeb } from "./poweredup";
|
|
9
|
+
export * from "./types";
|
|
10
|
+
export { BaseHub, LWP3Hub, WeDo2Hub, MoveHub, TechnicMediumHub, RemoteControl, DuploTrainBase, createHub, } from "./hub";
|
|
11
|
+
export * from "./devices";
|
|
12
|
+
export * from "./protocol";
|
|
13
|
+
export * as commands from "./commands";
|
|
14
|
+
/**
|
|
15
|
+
* Default export - PoweredUp class with Consts attached for backward compatibility
|
|
16
|
+
*
|
|
17
|
+
* Usage (ESM):
|
|
18
|
+
* import PoweredUP from "node-poweredup";
|
|
19
|
+
* const poweredUP = new PoweredUP();
|
|
20
|
+
* const led = await hub.waitForDeviceByType(PoweredUP.Consts.DeviceType.HUB_LED);
|
|
21
|
+
*
|
|
22
|
+
* Usage (CommonJS):
|
|
23
|
+
* const PoweredUP = require("node-poweredup");
|
|
24
|
+
* const poweredUP = new PoweredUP.PoweredUp();
|
|
25
|
+
*/
|
|
26
|
+
declare const PoweredUpDefault: typeof PoweredUp & {
|
|
27
|
+
Consts: typeof Consts;
|
|
28
|
+
PoweredUp: typeof PoweredUp;
|
|
29
|
+
PoweredUpWeb: typeof PoweredUpWeb;
|
|
30
|
+
};
|
|
31
|
+
export default PoweredUpDefault;
|