Commit graph

561 commits

Author SHA1 Message Date
Katie Broida
6ef600dc2c
Add runtime event for when the project is loaded (#1669) 2018-10-30 15:26:22 -04:00
Karishma Chadha
4959ab9ff3 Create a new cloud io device 2018-10-29 00:58:30 -04:00
Michael "Z" Goddard
fcafcbdd0a
return 0 from parameters outside of their procedure 2018-10-23 15:14:31 -04:00
Michael "Z" Goddard
ef4045aaf1
Merge pull request #1642 from mzgoddard/set-procedure-param-defaults
Set procedure param defaults
2018-10-23 15:13:16 -04:00
DD
91e2f3a935 Revert 1643 Confirm extension in use in sb2 serialization 2018-10-18 11:06:13 -04:00
Evelyn Eastmond
2564b24d71 Differentiate peripheral errors: request vs. disconnect (#1654)
* Beginning to add differentiation for hardware disconnect alerts.

* Set connected status after error is sent.
2018-10-17 15:48:07 -04:00
Katie Broida
899ce56214
Confirm extension in use in sb2 serialization (#1643)
Add a check when serializing sb2 projects to see whether an extension is actually in use in a block or a visible monitor.
2018-10-17 10:49:08 -04:00
Michael "Z" Goddard
2b257dde57
add getProcedureParamNamesIdsAndDefaults
Use getProcedureParamNamesIdsAndDefaults to get the defaults along with
names and ids so defaults may be set for a procedure call if the
parameter is not provided.
2018-10-16 16:31:45 -04:00
Andrew Sliwinski
23f6346045
Merge pull request #1631 from mzgoddard/stop-other-asks
Stop other asks
2018-10-15 13:16:49 -04:00
Michael "Z" Goddard
56ec22df77
add Runtime.executableTargets
executableTargets is a list of the targets in the reverse order of
their execution. This order matches the draw list's order in the
renderer.
2018-10-04 00:42:05 -04:00
Michael "Z" Goddard
574749bbba
add STOP_FOR_TARGET runtime event and respond for ask blocks
Remove questions for targets that are individually stopping and
progress the asked question if it is from a stopping target.
2018-10-03 10:38:14 -04:00
Eric Rosenbaum
f5edcfa3bb Update event name to MIC_LISTENING 2018-09-20 12:06:31 -04:00
Eric Rosenbaum
e44eff48e3 Add mic indicator update event for speech2text 2018-09-18 10:58:49 -04:00
Chris Willis-Ford
8977ce1e93
Merge pull request #1565 from cwillisf/extension-monitors
Extension monitors
2018-09-12 18:10:12 -04:00
Christopher Willis-Ford
346e1383ed Split extended opcode with splitFirst instead of split 2018-09-12 17:02:18 -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
Christopher Willis-Ford
8602d5798a Allow extension reporter only if no block args 2018-09-07 12:16:48 -07:00
Christopher Willis-Ford
f5182a231e Add getLabelForOpcode for use by monitors 2018-09-07 12:01:13 -07:00
Christopher Willis-Ford
701fb6c1c5 Enable extension monitors, add flag to disable
Extension reporters now offer a monitor checkbox by default, unless the
`disableMonitor` flag is set in the extension block metadata.
2018-09-07 11:13:13 -07:00
Karishma Chadha
62bf790d8f Fix stack glows so that stacks glow as soon as the first block in the stack starts running as opposed to after the first block has finished. Make sure that monitored reporters in the flyout are not glowing. 2018-08-22 14:44:06 -04:00
Ray Schamp
4b5cf6505a
Merge pull request #1398 from paulkaplan/publish-docs
Publish jsdoc to gh-pages
2018-08-08 16:46:48 -04:00
Karishma Chadha
d91788406c Don't generate new IDs for variables when making a sprite clone. 2018-08-07 16:24:02 -04:00
Karishma Chadha
337c1f464d Fix duplication of variables and re-write variable ids in referencing fields. 2018-08-07 00:30:03 -04:00
Paul Kaplan
79ab2fcb72 Add turbo mode events 2018-08-02 10:00:21 -04:00
Paul Kaplan
138d7136af Fix various jsdoc issues preventing the docs from building 2018-07-31 11:22:42 -04:00
Paul Kaplan
6d4c6df692 Add UserData ioDevice for setting and getting username from blocks 2018-07-23 09:38:58 -04:00
Paul Kaplan
7aa45ddb38 Update the category info name when the extension is refreshed.
Fixes an issue where changing languages did not update the name in the category menu.
2018-07-18 15:01:22 -04:00
Paul Kaplan
c428e2ec02
Merge pull request #1341 from mzgoddard/fix-report
fix unnecessary stackClick report from nested promise reporters
2018-07-18 09:58:47 -04:00
kchadha
5f5ea5ec24
Merge pull request #1361 from kchadha/sprite-upload-global-local-fix
Fix sprite upload variable conflict
2018-07-18 09:56:47 -04:00
Karishma Chadha
37b276935e Update fields of blocks to reference new variable names for renamed global so that the VM always has up-to-date and accurate information about the blocks. 2018-07-17 16:27:00 -04:00
Evelyn Eastmond
c4ee7065a2 EV3/Microbit critical fixes for code freeze (#1354)
* Resolves - BLESession and BTSession should emit PERIPHERAL_SCAN_TIMEOUT #1348.

* Resolves - BLESession should handle 'could not find service' error #1350.

* Resolves - BTSession should handle 'no peripheral connected' error #1351.

* Fixing a typo that caused device scan timeout bugs.

* Resolves - Add casting and clamping throughout the EV3 extension #1352.

* Fixing a linting error.

* Further fixes for issue #1351.
2018-07-17 16:03:05 -04:00
Karishma Chadha
99c1ce9286 Fix variable conflict that arises during sprite upload where the sprite may reference a global variable that conflicts with the name of a local variable on a different sprite in the project. 2018-07-17 15:37:28 -04:00
Karishma Chadha
ee9a99b928 Fix variable deletion bug. 2018-07-15 19:00:55 -04:00
Karishma Chadha
a8fc399746 Fix var rename bug where variable would go back to old name after switching sprites. 2018-07-15 18:58:56 -04:00
Karishma Chadha
2b2fc2e561 Code cleanup, refactor, abstraction 2018-07-13 12:58:45 -04:00
Michael "Z" Goddard
fee3c4cc04
fix unnecessary stackClick report from nested promise reporters
Check that a reporting block is the last operation as part of some
parent block. The last operation is the block itself which may report
values for stack clicks and monitor updates if it meets other
requirements.
2018-07-13 10:23:42 -04:00
Karishma Chadha
406e59fc18 Fix variable conflicts that arise when sharing the love of a sprite-local variable with the stage. 2018-07-13 09:36:43 -04:00
Paul Kaplan
b33d9ba4e0
Merge pull request #1335 from mzgoddard/fix-execute
fix asynchronous block execution
2018-07-13 08:32:20 -04:00
Paul Kaplan
e463781bc1
Merge pull request #1330 from paulkaplan/glow-on-stack-click
Always glow threads that come from stack clicks
2018-07-13 07:53:05 -04:00
Michael "Z" Goddard
d2c637a621
fix asynchronous block execution
Freeze promise waiting blocks into an array of reported values. Thaw
those reported values into parent values of matching blocks by id. If
the reporting block was waiting on a promise and reported a value
assign it to its parent value at that future time.
2018-07-13 00:04:49 -04:00
DD Liu
004f38190a Merge branch 'develop' into loadCostume 2018-07-12 15:16:17 -04:00
Paul Kaplan
9dbb362b36 Remove log line 2018-07-12 14:40:13 -04:00
Paul Kaplan
bcd76c995e Always glow threads that come from stack clicks 2018-07-12 11:24:06 -04:00
Kreg Hanning
06c4e5516f Add micro:bit matrix field block (#1314)
* Add micro:bit matrix field block

* Remove debug logs

* Remove rowcol menu

* Fix lint errors
2018-07-11 16:13:49 -04:00
DD Liu
6aefd13af6 Break load costume into more functions, and update how bitmaps are loaded 2018-07-10 10:30:38 -04:00
Ray Schamp
55944bc4b6
Merge pull request #1285 from LLK/feature/device-connection
Device connection update for micro:bit and EV3 extensions
2018-07-09 14:26:06 -04:00
Eric Rosenbaum
6f5ff31eb3 Add disconnectExtensionSession and getPeripheralIsConnected 2018-07-09 13:49:41 -04:00
Evelyn Eastmond
4332725d33 Adding more errors based on web socket onerror and onclose. Moved extension runtime mapping of devices back to MicroBit class. 2018-07-09 13:41:57 -04:00
Evelyn Eastmond
9d66c54f8a Adding error reporting to runtime from BLESession. 2018-07-09 13:41:57 -04:00
Evelyn Eastmond
730b798686 Extension/runtime protocol refactoring. 2018-07-09 13:41:57 -04:00