Commit graph

389 commits

Author SHA1 Message Date
Kevin Andersen
40c022ca8e - Refactoring of output commands:
- Simplified generateOutputCommand() to follow the LEGO Wireless Protocol command-structure. Every output-command must have a portID, execution information, sub-command, and then followed by a custom payload which must be defined according to the protocol documentation mentioned in the extension.
- Simple motor commands now use the above subcommand-structure rather than the former primitive command structure.
- stopLED()-function removed since it's not used
- Implemented check of pendingPromiseFunction() for motors before firing.
2019-02-22 12:50:19 -05:00
Kevin Andersen
9767d72188 - Cleaned up TODOs!
- Added and made use of more enums rather than hardcoded bytes
2019-02-21 14:47:30 -05:00
Kevin Andersen
1d72b3b971 - Removed unused distance-mode from BoostMode-enum
- Added descriptions to BoostMode-enums
- Improved motor-position handling
- Added helper-functions for converting to/from motor position values
- Added default value to BoostMotor._pendingPromiseFunction
- Added changeLedColorBy-block
- Only motors will now try to resolve motor-promises
- Changed motor position wording from 'zero' to 'reset'
- Modified tilt-thresholds to improve tilt-handling
2019-02-21 13:35:21 -05:00
Kevin Andersen
e99a217ba5 Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension 2019-02-14 13:31:13 -05:00
Kevin Andersen
32a9674b5d Added disconnect-handling per new extensions-spec. Motor-commands that fail will now also cause their blocks to complete 2019-02-14 13:30:58 -05:00
unknown
ac571ece5a Fixing comment. 2019-02-13 14:14:05 -05:00
Evelyn Eastmond
8bbdc4e691 Resolves #1988: Vernier gdxfor tilt values should be 0 when disconnected. 2019-02-13 14:14:05 -05:00
Chris Willis-Ford
7ab41d2bd9
Merge pull request #1881 from apple502j/pen-legacy
Fix legacy `set pen color` block's transparency behavior
2019-02-13 10:51:47 -08:00
Kevin Andersen
245ba998d2 merge changes from origin/develop 2019-02-12 13:18:28 -05:00
Kevin Andersen
e2bd28b85e Cleaned up documentation (WIP). Added Output subcommand enum for use throughout extension 2019-02-12 10:10:21 -05:00
Kevin Andersen
c902bbaa0d Cleaned up some documentation. Consolidated and renamed Boost enums 2019-02-11 11:30:22 -05:00
Kevin Andersen
bf02426a4a added named variables to onMessage for readability. Changed wording of motor-blocks. Added BLE Advertisement Manufacturer Data as filter for scanning, for https://github.com/LLK/scratch-link/issues/112 2019-02-11 10:57:57 -05:00
Chris Willis-Ford
51252531af
Update src/extensions/scratch3_pen/index.js
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2019-02-08 20:03:54 +09:00
Chris Willis-Ford
2d575a9208
Update src/extensions/scratch3_pen/index.js
Co-Authored-By: apple502j <33279053+apple502j@users.noreply.github.com>
2019-02-08 20:03:48 +09:00
Evelyn Eastmond
b5eb54fc44 Resolves 1975: Vernier gdxfor extension should disconnect on sensor timeout. 2019-02-07 16:18:56 -05:00
Evelyn Eastmond
16ebcb82b2
Merge pull request #1986 from evhan55/bug/gdxfor-falling
Vernier gdxfor "falling?" report false when not connected
2019-02-07 15:54:46 -05:00
Evelyn Eastmond
7e7326f474
Merge pull request #1984 from evhan55/extensions/gdxfor-update-rate
Vernier gdxfor input rate change
2019-02-07 15:24:11 -05:00
Evelyn Eastmond
a68886cee9 Resolves #1977: Vernier gdxfor extension falling? reports true while hardware disconnected. 2019-02-07 14:51:59 -05:00
Eric Rosenbaum
9dd8e9398a
Merge pull request #1982 from VernierST/extensions/gdx-for-freefall-and-tilt
GDX-FOR better freefall algorithm and different tilt options
2019-02-07 11:59:50 -05:00
Evelyn Eastmond
104e997b59 Changing the input rate, resolves 1976. 2019-02-07 10:48:48 -05:00
Ian Honohan
7b3996a173 Add localization to the front/back/left/right menu items 2019-02-06 12:51:32 -08:00
Ian Honohan
7cbf4e2a60 Changes the tilt options from x/y to front/back and left/right. Also limits the tilt range to +/-90, just like micro::bit 2019-02-06 10:52:18 -08:00
Eric Rosenbaum
3ae6c93394 Change l10n id so translations will update 2019-02-06 10:40:06 -05:00
Eric Rosenbaum
48e01fe1a3 Rename “spin speed” to “spin” 2019-02-05 17:22:17 -05:00
Eric Rosenbaum
78c72f4185 Add spacers 2019-02-05 17:22:06 -05:00
Ian Honohan
5a2eb3b296 Accounts for any rotation in the GDX-FOR while trying to detect freefall 2019-02-05 12:12:17 -08:00
Evelyn Eastmond
39f69bd8c1 Separate out _spinSpeedFromGyro function. 2019-02-04 21:56:20 -05:00
Evelyn Eastmond
8da82cfe01 Adding JSDoc and removing extension manager gdx uncommenting. 2019-02-04 21:45:23 -05:00
Evelyn Eastmond
da3fc930b1 Factoring out a _onSensorValueChanged function. 2019-02-04 21:41:57 -05:00
Evelyn Eastmond
e87dd01629 Add clearing of values on disconnect. 2019-02-04 19:43:50 -05:00
Evelyn Eastmond
93aecc88be Filling in some comments. 2019-02-04 19:41:07 -05:00
Evelyn Eastmond
9390cd0f8a Fixing 'gyro' labels to 'spin speed'. 2019-02-04 19:41:07 -05:00
Evelyn Eastmond
d84dd72a8c Removing canReadSensors and sensorsEnabled, first pass. 2019-02-04 19:41:07 -05:00
Evelyn Eastmond
eb4f6235d9 Testing new sensor array to store sensor data on/offline. 2019-02-04 19:41:07 -05:00
Kevin Andersen
5822f762ca Multiple motor-changes. Changed _isOn to _status to reflect the more advanced states a motor (or port) can be in. Implemented promise-based completion on motor-on-for-rotation-block, since this block requires a callback from the hub. Changed lower threshold for power-bias function. Deleted some outdated todos. Changed connectID-terminology to portID. Implemented handling port output command feedback. Commented out some distance and tilt-related blocks that I think we can do without and that will lower the number of blocks. 2019-02-04 16:30:04 -05:00
Kevin Andersen
c03dc60feb Deleted BoostUnit, since the new protocol has prescribed units for a particular mode. Implemented helper-function for turning javascript numbers into a bytearray. Changed generateInputCommand()-function delta-parameter to be int32 according to the new protocol. Fixed issue that whenColor hat-block didn't work until dropdown value changed. 2019-02-01 10:19:59 -05:00
Eric Rosenbaum
12283daaa4
Merge pull request #1958 from ericrosenbaum/feature/vernier-updates
Update, re-order and clean up Vernier Force & Accel extension blocks
2019-01-30 16:49:46 -05:00
Eric Rosenbaum
3bdb13f049 Rename and re-order freefall threshold constant 2019-01-29 17:12:15 -05:00
Eric Rosenbaum
6cbc71f8d1 Add facing threshold 2019-01-29 17:09:11 -05:00
Eric Rosenbaum
4449ee7f0f Only round sensor vals in opcodes 2019-01-28 17:45:16 -05:00
Eric Rosenbaum
c033732d62 Use enums and constants in isFacing 2019-01-28 17:15:37 -05:00
Eric Rosenbaum
f795197047 Enum and localization for facing up/down 2019-01-28 17:12:25 -05:00
Eric Rosenbaum
b5fb80190d Factor out and scale spin speed 2019-01-28 17:06:14 -05:00
Eric Rosenbaum
1abbf55f55 Re-order and update blocks 2019-01-28 14:05:39 -05:00
Eric Rosenbaum
c542b2384f
Merge pull request #1938 from ericrosenbaum/bugfix/text2speech-default-input-localization
Fix Text to Speech extension default input localization
2019-01-28 10:40:58 -05:00
Eric Rosenbaum
92d2a1673a Updating blocks 2019-01-24 17:01:46 -05:00
Kevin Andersen
2aaf424279 stuff 2019-01-24 10:08:17 +01:00
Eric Rosenbaum
09daeb53a1 Don’t use a variable in formatMessage 2019-01-23 17:56:38 -05:00
Eric Rosenbaum
9e00c06ddf Localize the makey makey blocks 2019-01-23 14:05:00 -05:00
Kevin Andersen
ffb5cd63af added zero-block for motor positioning. Added turn-for-rotation-block, but its WIP. Modified generateOutputCommand to allow for advanced motor commands. Changed motor position reporter to follow hardware instead of wrap-clamping. 2019-01-23 09:10:03 +01:00