Commit graph

72 commits

Author SHA1 Message Date
Eric Rosenbaum
4bf5f85d9a Lint (remove logs, add spaces) 2019-06-27 15:48:30 -04:00
Eric Rosenbaum
a115f6dde5
Merge branch 'develop' into enhancement/1929 2019-06-19 11:09:14 -04:00
Christopher Willis-Ford
33a6071466 for compatibility, make all existing extension menus accept reporters 2019-06-14 12:29:32 -07:00
Evelyn Eastmond
704774d6d1 Fixing debug statements and also adding a safety check for timeoutIDs. 2019-06-12 09:02:12 -04:00
Evelyn Eastmond
37fe83c057 Adding disconnect/state resetting behavior to rest of hardware extensions. 2019-06-12 09:02:12 -04:00
Eric Rosenbaum
68e7f24bb9
Revert "Rate limiting for micro:bit using TaskQueue" 2019-03-18 10:16:50 -04:00
unknown
c603e0d653 Fixing linting errors. 2019-03-07 08:38:52 -05:00
unknown
0a9f629fb4 Comment out console logs. 2019-03-07 08:26:38 -05:00
unknown
43fde03f57 Fixing the comment yet again. 2019-03-06 13:17:06 -05:00
unknown
f1fc54bfaf Fixing comment based on cwf suggestion. 2019-03-06 13:13:57 -05:00
unknown
2148e9ead1 Adding stopAll binding back in after un-rebased merge. 2019-03-06 13:08:55 -05:00
unknown
54ed67ac22 Adding TaskQueue import back in after un-rebased merge. 2019-03-06 12:57:32 -05:00
unknown
7a14dad668 Removing console logs that came in accidentally via un-rebased merge. 2019-03-06 12:55:04 -05:00
unknown
fed43e1841 Removing busy flag again which was reintroduced via a un-rebased merge. 2019-03-06 12:53:17 -05:00
unknown
b31a1f0e98 Move argument processing outside of TaskQueue.do calls. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
f5dc90f729 Fixing comment again. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
d2c14f872c Fixing comment. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
00d1a407ac Fixing some comments. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
3c77f82238 Changing maxTokens and refillRate for microbit test. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
fb36731ce4 Add catches for task queue Promise rejections, and some debug console logs. 2019-03-06 12:47:44 -05:00
Evelyn Eastmond
eecd508464 Fix usage of task queue with an opcode that has its own promise/time delay resolution (i.e. displayText in microbit). 2019-03-06 12:46:56 -05:00
Evelyn Eastmond
6688106852 Continuing to test the newest TaskQueue with microbit. 2019-03-06 12:44:22 -05:00
Evelyn Eastmond
59ab3b717d Fixing clearInterval > clearTimeout. 2019-03-01 10:04:56 -05:00
Evelyn Eastmond
7a1367d81a Change from setInterval to setTimeout for auto disconnect feature. 2019-03-01 10:02:30 -05:00
Evelyn Eastmond
6e290ea937 Calling microbit timeout error in an arrow function. 2019-01-16 16:23:06 -05:00
Evelyn Eastmond
5c885911e7 Replacing a timeout clear. 2019-01-16 16:06:44 -05:00
Evelyn Eastmond
28a54d6e83 Adding back in the disconnect branch to be fixed later in another PR. 2019-01-16 16:05:13 -05:00
Evelyn Eastmond
7ec9494804 Making corrections based on discussion with ericr. 2019-01-16 15:54:38 -05:00
Evelyn Eastmond
d7b6cfae97 Move micro:bit data stopped error string to constant. Added another jsdoc. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
7518a9c149 Changing error to be more accurate. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
2d9531a15c Removing console logs. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fdda1e53e3 Change microbit extension to send BLE socket error on data lost, instead of calling disconnect directly. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
fab292889f Adding disconnect callback to BT/BLE error system. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
53c165c2f6 Close Scratch Link web socket on every new peripheral scan attempt (#1696)
* Progress towards: #1671: Close web socket before making a new one for hardware extensions.

* Always disconnect before scanning for new peripheral.  Removing console logs.

* Removing unused test code.
2018-11-08 15:21:28 -05:00
Evelyn Eastmond
0d7cc66ad5 Changing menu names to include extension label. 2018-10-05 11:08:20 -04:00
Evelyn Eastmond
4583cb821b
Merge pull request #1611 from evhan55/fixes/hardware-extensions
Hardware extensions bug fixes
2018-09-25 20:42:30 -04:00
Kreg Hanning
fa0af58c41 Make "display [Hello!] block yield until printing is done (#1599)
* Make "display [Hello!] block yield until printing is done

* Add 2 additional px to yield delay

* Add 3 more additional px for large chars
2018-09-25 14:56:29 -04:00
Evelyn Eastmond
a676970359
Merge pull request #1607 from evhan55/multiple-alerts
Show customized alerts on hardware extension peripheral errors.
2018-09-25 14:44:29 -04:00
Evelyn Eastmond
e9b0cc768e Further fixes to 'button pressed?' on Microbit. 2018-09-25 11:26:18 -04:00
Evelyn Eastmond
4b2b82a224 Fixing #1364: Microbit 'button pressed?' block should return true/false. 2018-09-25 11:26:18 -04:00
Kreg Hanning
91d46bb92b Remove the word "test" (#1600) 2018-09-25 10:49:45 -04:00
Kreg Hanning
b81ba599db Trim whitespace in "display [♡]" input field (#1598) 2018-09-25 10:47:33 -04:00
Evelyn Eastmond
3c905503b7 Adding extension ids to customize error alerts for extensions. 2018-09-22 14:48:41 -04:00
Evelyn Eastmond
ad3328197e Testing adding message/extensionId passing into specific, custom alerts. 2018-09-22 14:04:37 -04:00
Evelyn Eastmond
96327c66f3 Passing custom alert messages with PERIPHERAL_ERROR. 2018-09-22 14:04:37 -04:00
Kreg Hanning
06f64c0527 Rename block "display [Hello!]" to "display text [Hello!]" (#1597) 2018-09-19 11:16:16 -04:00
Evelyn Eastmond
ec432e3b2f Refactor for hardware extensions (#1555)
* Beginning refactor: renaming 'device' to 'peripheral', shortening function names, reordering functions, etc.

* Continuing refactoring: renaming some functions to be more verbose in the runtime, adding JSDocs, etc.

* Changing 'device' to 'peripheral', etc.

* Changing 'session' to 'socket'.

* Fixing EV3 menus and menu arg validation, reordering functions, etc.

* Add _send, add some references to documentation, etc.

* Factored out _outputCommand and _inputCommand, renamed some enums, etc.

* Fixed _outputCommand, some other minor cleanup.

* Make _outputCommand and _inputCommand public.

* Added TODO.

* Renamed BLE UUID enums to be clearer.

* Change WeDo2 in comments to WeDo 2.0, etc.

* Changed some WeDo2Motor command names, cleaned up some JSDocs.

* Beginning a major EV3 refactor.

* WeDo2 formatting and comment changes.

* Motor refactoring in EV3: motorTurnClockwise and motorTurnCounterClockwise initial working state.

* Add reminders to possibly cast motor menu args in WeDo2.

* Continue to move motor commands in EV3 to EV3Motor class, don't create new EV3Motor on every poll cycle, etc.

* Factoring EV3 polling value commands, etc.

* Fixing EV3 motor power, position and button pressed, and some commenting, etc.

* Move EV3 motor position parsing to EV3Motor class, move directCommand and directCompoundCommand functions, some commenting, etc.

* Changed WeDo2 motor label enum name.

* Removed some EV3 motor functions that aren't needed, changed menu label enum names, moved some opcodes up to enums.

* Fixing comments and documentation.

* Some commenting.

* Adding further documentation and references to PDFs, changed reply check to be safer, etc.

* Some comment changes.

* Moving some functions around in EV3 and WeDo2 to match.

* Commenting, etc.

* Some renaming of session, etc.

* Fix stopAllMotors in EV3.

* Fixing clearing of motors in EV3.

* Some comment changes.

* Change runtime .extensions/registerExtension to .peripheralExtensions/registerPeripheralExtension.

* Renaming outputCommand/inputCommand to generateOutputCommand/generateInputCommand, etc.

* Moved motorCommandIDs to EV3Motor class, renamed directCommand to generateCommand, etc.

* Adding a reminder to rename something.

* JSDoc fix in EV3Motor class.

* Fixing microbit function name.

* Adding a todo item.

* Changing Ev3 menu formats to be backwards compatible, moving a BLE function up.

* Fixing EV3 ports again, and button pressed returning a boolean.

* Fixing menu value to be a string in EV3.
2018-09-07 17:01:23 -04:00
Eric Rosenbaum
83b3eabf1d
Regulate micro:bit send timing (#1471)
* display blocks yield for 50ms

* WIP on microbit command send timing

* WIP on microbit command send timing

* Cleanup and JSDOC

* Send “withResponse” param to Link

* Remove caching, add busy timeout
2018-08-16 15:38:03 -04:00
Connor Hudson
8d88058ae5 Allow localizing micro:bit blocks (#1431)
* Replace micro:bit block text with formatMessage calls

* Add l10n support to micro:bit block menus

* Remove A, B button translation, update some l10n descriptions

* Fix mismatched l10n description
2018-08-14 12:19:26 -04:00
Evelyn Eastmond
6444cf071d Feature/critical extension fixes (#1383)
* Resolves - Turning micro bit power off doesn't disconnect microbit #1366.

* Resolves EV3 motor block causes distance to return 0 #1363.

* Fixing linting.

* Tweak micro:bit auto-disconnect timeout.
2018-07-24 11:08:48 -04:00