Commit graph

3072 commits

Author SHA1 Message Date
Karishma Chadha
94fa3d56c8 Fix saving and loading of slider min max values. Add test for sb2 to sb3 conversion that tests all montior properties remain the same after save and load. 2019-01-25 14:14:46 -05:00
yokobond
8eee92d41a Escape variable name in XML 2019-01-25 10:31:33 +09:00
Michael "Z" Goddard
08c939f522
add simple loading time benchmark detail 2019-01-24 17:48:17 -05:00
Michael "Z" Goddard
d8ae96a58c
build playground/benchmark.js 2019-01-24 17:48:17 -05:00
Eric Rosenbaum
92d2a1673a Updating blocks 2019-01-24 17:01:46 -05:00
Karishma Chadha
0bf5d8ab90 Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function. 2019-01-24 15:26:16 -05:00
Erik Mejer Hansen
c750957465 Convert lint breakage 2019-01-24 13:21:46 +01:00
Kevin Andersen
2aaf424279 stuff 2019-01-24 10:08:17 +01:00
Karishma Chadha
e5723e299a Add runtime to blocks container since it was getting passed in everywhere where it was being referenced. Update calls to blocks constructor. 2019-01-23 18:18:38 -05:00
Eric Rosenbaum
09daeb53a1 Don’t use a variable in formatMessage 2019-01-23 17:56:38 -05:00
greenkeeper[bot]
5f32cc76e0 chore(package): update lockfile package-lock.json 2019-01-23 21:16:51 +00:00
greenkeeper[bot]
089f892316 fix(package): update @vernier/godirect to version 1.4.1
Closes #1915
2019-01-23 21:16:48 +00:00
Eric Rosenbaum
9e00c06ddf Localize the makey makey blocks 2019-01-23 14:05:00 -05:00
Karishma Chadha
98b92be2d7
Merge pull request #1928 from kchadha/timer-perf
Improve the performance of the timer utilitiy
2019-01-23 11:41:41 -05:00
Karishma Chadha
7588f08f3b
Use sequencer runtime directly instead of doing an extra lookup 2019-01-23 11:33:36 -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
Kevin Andersen
7cee07db83 Changed default motor to A instead of all. Added TODOs and DEBUG code comments. Changed output-commands to use proper enums 2019-01-21 08:01:10 +01:00
Erik Mejer Hansen
ceaa3c7857 Add support extensions to define custom field types.
This is done by adding a new element "customFieldTypes" to the extension info structure. Ex:
```
customFieldTypes: {
   angleField: {
      implementation: { fromJson: options => new AngleField(options) },
      output: 'number',
      outputShape: 2,
   }
}
```
Field types are defined by an implementation that has to match what is expected by ScratchBlocks.Field.register and its output and shape.

src/engine/runtime.js has been updated to handle the new "customFieldTypes"-field:
- Existing (global) field types cannot be overridden
- New fields are "namespaced" to the extension in the same way as opcodes are.

Once the custom field type has been picked up by scratch-vm a "EXTENSION_FIELD_ADDED" event is emitted.
It is then up to the hosting app to call ScratchBlocks.Field.register to register the field type with ScratchBlocks. Ex:
```
vm.addListener('EXTENSION_FIELD_ADDED', fieldInfo => {
   this.ScratchBlocks.Field.register(fieldInfo.name, fieldInfo.implementation);
});
```
2019-01-20 21:24:32 +01:00
Eric Rosenbaum
9d4442444f
Merge pull request #1914 from bocoup/sensor-error
Prevent console errors when disconnecting/reconnect to Vernier extension
2019-01-18 17:09:38 -05:00
Eric Rosenbaum
0b251adace
Merge pull request #1763 from evhan55/extensions/disconnect-errors
Various fixes to extension disconnect errors
2019-01-18 16:58:45 -05:00
Evelyn Eastmond
4b9488cf66 Restoring package-lock.json 2019-01-16 20:38:45 -05:00
Evelyn Eastmond
7831256044 Change event names to be more descriptive. Fix some typos. 2019-01-16 20:17:19 -05:00
Evelyn Eastmond
6f9a4864e9 Fix typo. 2019-01-16 19:59:51 -05:00
Evelyn Eastmond
802f752ded Prevent setting onCharactericChanged callback to null. 2019-01-16 19:50:32 -05:00
Evelyn Eastmond
6e290ea937 Calling microbit timeout error in an arrow function. 2019-01-16 16:23:06 -05:00
Evelyn Eastmond
e1e8e57403 Adding TODOs. 2019-01-16 16:08:15 -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
2761209631 Changing JSDoc slightly, again. 2019-01-16 16:00:25 -05:00
Evelyn Eastmond
c30807a678 Finetuning a JSDOC. 2019-01-16 15:56:58 -05:00
Evelyn Eastmond
7ec9494804 Making corrections based on discussion with ericr. 2019-01-16 15:54:38 -05:00
Evelyn Eastmond
bd8f129022 Adding a TODO for an optional read param. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
e4b82aeaef Adding callback back to battery read to fix clearing the characteristicChanged callback by accident. 2019-01-16 15:22:58 -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
f030afbdc5 Removing extra params from a BLE read in WeDo2. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
156b1bc21a Adding new runtime event for intentional peripheral disconnects. 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
a177b4eeb7 Adding interval to check for battery level. 2019-01-16 15:22:58 -05:00
Evelyn Eastmond
ae95df553d
Merge pull request #1924 from evhan55/extensions/vernier-withresponse-fix
Removing withResponse flag in GDX-FOR extension write method
2019-01-16 15:14:35 -05:00
Karishma Chadha
0fa5e9181a
Merge pull request #1839 from mzgoddard/fix-missing-no-param
fix: initialize stack frame params for all procedures
2019-01-16 14:06:38 -05:00
Karishma Chadha
325372233d Improve the performance of the timer utilitiy so that it does not garbage collect multiple times per frame. 2019-01-16 10:09:19 -05:00
Paul Kaplan
4b777d94e4
Merge pull request #1925 from ericrosenbaum/bugfix/dont-load-vernier-yet
Do not load Vernier extension yet
2019-01-15 15:29:15 -05:00
Eric Rosenbaum
5d329663aa do not load vernier extension yet 2019-01-15 15:20:05 -05:00
Evelyn Eastmond
a6c05d8f61 Removing withResponse flag since it is not needed and was causing a crash on Windows. 2019-01-15 11:43:08 -05:00
Karishma Chadha
d5c2991a25
Merge pull request #1923 from ktbee/missing-block-early-exit
Add early exit for non-existent block
2019-01-15 11:29:40 -05:00
Karishma Chadha
fefb032f17
add comment before using util.initParams
Co-Authored-By: mzgoddard <mzgoddard@gmail.com>
2019-01-15 11:24:47 -05:00
Katie Broida
8256b3d5c5 Add early exit for non-existent block 2019-01-15 11:15:23 -05:00