Commit graph

3099 commits

Author SHA1 Message Date
Christopher Willis-Ford
e8089cd2a5 Don't check for methods on window.native
It turns out that `window.native.someMethod` always evaluates as
`undefined` -- even if calling that method would succeed. This change
removes checks for such methods so that the WeDo2 blocks can work.
Note that the hat blocks are still unimplemented, and some assumptions
are made about the form that arguments and `util` will take.
2016-05-03 09:48:26 -07:00
Christopher Willis-Ford
e1109e8ca6 Improve error exception report for Android Monitor
Android Monitor doesn't support passing multiple arguments to
`console.error`, so this change instead builds a single string for the
report.
2016-05-03 09:48:12 -07:00
Christopher Willis-Ford
66e4a55b74 Fix _motorOnFor not setting _motorTimeout 2016-05-03 09:44:13 -07:00
Christopher Willis-Ford
b9af4f7894 WIP implementation for WeDo2 blocks
Hat blocks are still TBD.
Motor blocks assume a `util` argument which has methods for `yield()`
and `done()`.
2016-05-03 09:44:13 -07:00
Tim Mickel
4c6f08f665 Add mechanism for per-block metadata 2016-05-03 11:45:25 -04:00
Tim Mickel
c4138e6603 Merge pull request #13 from tmickel/feature/s3-blocks
Implement thread status, yield timers, block glow, wait
2016-05-03 11:27:14 -04:00
Tim Mickel
1094ce5cc2 Recompile 2016-05-03 11:26:53 -04:00
Tim Mickel
417296ac69 Remove debug reference 2016-05-03 11:26:28 -04:00
Tim Mickel
4de24cfc30 Implement thread status, YieldTimer, block glow, wait 2016-05-03 11:26:28 -04:00
Tim Mickel
3eeccf1970 Update nextBlock to be set before primitive call 2016-05-03 11:26:15 -04:00
Tim Mickel
7eef10ef8c Merge pull request #16 from tmickel/bugfix/fix-move
Shuffle moveBlock to allow case where e.oldParent !== undefined
2016-05-03 11:25:22 -04:00
Tim Mickel
6906a8dc27 Recompile 2016-05-02 22:34:16 -04:00
Tim Mickel
6bbeb2d0fe Shuffle moveBlock to allow case where e.oldParent !== undefined 2016-05-02 22:31:00 -04:00
Tim Mickel
b7ffe6d774 Merge pull request #12 from cwillisf/feature/execute-blocks
Allow the Sequencer to execute a JS function for each block
2016-05-02 15:27:51 -04:00
Christopher Willis-Ford
7ae1e6cbe5 Recompile 2016-05-02 11:57:22 -07:00
Christopher Willis-Ford
751ca97733 Fix eslint errors
This includes adding a line to `.eslintrc` to allow `console.log`,
`console.warn`, and `console.error`.
2016-05-02 11:56:52 -07:00
Christopher Willis-Ford
4a3276d026 Improve block primitive lookup and execution
Slightly simplify export of block primitives from a block package.
Catch and report exceptions from block functions.
2016-05-02 11:31:37 -07:00
Christopher Willis-Ford
27c06ce476 Add framework for block execution
The runtime now stores a mapping of opcode to function.
The `wedo2` and `scratch3` packages are currently stubs.
2016-05-02 11:31:25 -07:00
Tim Mickel
f90fccb0d1 Merge pull request #11 from tmickel/feature/blockly-feedback
Block and stack glowing
2016-05-02 14:07:19 -04:00
Tim Mickel
79f6725ff3 Add stack glow and infrastructure for block glow 2016-05-02 13:09:38 -04:00
Tim Mickel
773f2e1bbc Improve JSDoc on Thread 2016-05-02 13:05:48 -04:00
Tim Mickel
7a5341b863 Merge pull request #10 from tmickel/feature/toggle-thread
Fix _removeThread, add toggleStack, green flag, stop button functions
2016-05-02 10:50:29 -04:00
Tim Mickel
b92a73da0f Add green flag and stop button functions 2016-04-29 17:58:31 -04:00
Tim Mickel
b67558d777 Recompile 2016-04-29 17:41:36 -04:00
Tim Mickel
b46ee0113f Return if a thread is toggled off 2016-04-29 17:39:18 -04:00
Tim Mickel
7d9f75b14d updating _removeThread to actually match docs 2016-04-29 17:36:09 -04:00
Tim Mickel
96123f870f Fix _removeThread documentation and add toggleStack 2016-04-29 17:31:04 -04:00
Tim Mickel
69450031cd Merge pull request #9 from tmickel/feature/flyout-listening
Add listener for new blocks that doesn't add to stacks
2016-04-29 17:17:49 -04:00
Tim Mickel
2b2187014f fix createBlock 2016-04-29 16:55:13 -04:00
Tim Mickel
11c6537f42 Add listener for new blocks that doesn't add to stacks 2016-04-29 16:49:08 -04:00
Tim Mickel
ab5c79730c Merge pull request #5 from tmickel/feature/sequencing
Add basics of threads and sequencing
2016-04-29 15:45:50 -04:00
Tim Mickel
6b07583fba Recompile 2016-04-29 15:40:36 -04:00
Tim Mickel
0352024bdb Merge remote-tracking branch 'LLK/develop' into feature/sequencing
# Conflicts:
#	vm.js
#	vm.min.js
2016-04-29 15:39:14 -04:00
Andrew Sliwinski
eaf6016b8e Merge pull request #4 from tmickel/bugfix/too-many-stacks
Remove reference to old newParentId
2016-04-26 17:33:48 -04:00
Tim Mickel
b3e981ba74 Updating timer require 2016-04-26 17:06:24 -04:00
Tim Mickel
1bda89ffbb Updating timer test for timeElapsed
This is a better name for it and now the value isn't negative...
2016-04-26 17:03:22 -04:00
Tim Mickel
92dab97b84 Add thread management and stepping to runtime 2016-04-26 16:50:49 -04:00
Tim Mickel
dbfb3356c6 Move threads list to the Runtime 2016-04-26 15:51:14 -04:00
Tim Mickel
b6186a44f3 Add basics for the sequencer and threads 2016-04-26 15:00:45 -04:00
Tim Mickel
33340125e4 Adding JSDocs, threads, sequencer to runtime 2016-04-26 14:23:22 -04:00
Tim Mickel
182b16f412 Remove reference to old newParentId 2016-04-26 13:56:17 -04:00
Andrew Sliwinski
f1375ef44f Delete unused primitives stub 2016-04-26 12:05:38 -04:00
Andrew Sliwinski
389d112729 All tests passing 2016-04-26 09:54:14 -04:00
Andrew Sliwinski
981b85e78f AST create / change / move / delete from blockly 2016-04-26 09:49:52 -04:00
Andrew Sliwinski
53779220b7 WIP 2016-04-18 18:03:18 -04:00
Andrew Sliwinski
14b92f8a99 Add travis config 2016-04-18 17:22:23 -04:00
Andrew Sliwinski
f9f47ed103 WIP 2016-04-18 17:20:30 -04:00
Andrew Sliwinski
655556273a Initial commit 2016-04-08 13:10:37 -04:00
Andrew Sliwinski
9d5423f22a Initial commit 2016-03-28 12:53:44 -04:00