Commit graph

3965 commits

Author SHA1 Message Date
Kevin Andersen
6cf00a4235 Linted 2019-03-04 17:39:02 -05:00
Evelyn Eastmond
cd85e8ddfa
Merge pull request #2014 from evhan55/extensions/microbit-timeout
Fix micro:bit auto-disconnect from setInterval to setTimeout
2019-03-04 15:29:38 -05:00
Michael "Z" Goddard
53b0b7e923
update text-encoding to latest version 2019-03-04 13:01:37 -05:00
Michael "Z" Goddard
33f4482127
Merge pull request #1972 from mzgoddard/sound-bank-over-sprite
Sound bank over sprite
2019-03-04 12:51:10 -05:00
Michael "Z" Goddard
9350c2a9c2
Merge pull request #1947 from mzgoddard/sb2-load-assets-first
Deserialize sb2 assets before other sprite data and blocks
2019-03-04 12:50:09 -05:00
Kevin Andersen
852ae43348 This commit is a combination of changes after an internal play test with the Scratch Team, as well as code cleanup.
Motors:
- motor position will now initially report 0 instead of false
- removed remaining motor position zeroing functions.
- removed startBraking().
- turnOn() and turnOnForDegrees() are now using an absolute max power as per the protocol documentation.
- the "turn for rotations"-block now accepts negative values.
-- turnOnForDegrees() accepts a direction to reflect the change above. The direction from the block is calculated against the motors current direction.
- commented EV3 tacho calculation code for motor positioning removed.
- Changed BoostMotorLabel to reflect actual motor block argument.
- startMotorPower() renamed to setMotorPower() since it doesn't start the motor.
- setMotorPower() will not start the motor.
- Max number of rotations for a motor-block is clamped to 100 rotations.
- 'Default' removed from BoostMotorLabel-enum as it wasn't used.

Sensors:
- removed remaining distance-related functions.
- color-reporters default value is now none rather than black.
- tilt-angles left and right switched to reflect the hubs orientation.
2019-03-04 12:38:02 -05:00
Karishma Chadha
49a891a014
Merge pull request #2000 from LLK/greenkeeper/scratch-sb1-converter-0.2.7
Update scratch-sb1-converter to the latest version 🚀
2019-03-04 12:35:43 -05:00
Karishma Chadha
ebfba83989
Merge branch 'develop' into greenkeeper/scratch-sb1-converter-0.2.7 2019-03-04 12:15:20 -05:00
Karishma Chadha
ff59ebd7c5
Merge pull request #2019 from LLK/greenkeeper/scratch-parser-4.3.5
Update scratch-parser to the latest version 🚀
2019-03-01 13:24:24 -05:00
Kevin Andersen
669ff1abf1 - Boost-icon added to blocks
- Added BoostColorLabel-enum for color sensing block argument labels
- Regrouped blocks to be grouped by functionality, promoting color sensing
- Added 'any' to whenColor hat-block which triggers if the color sensor reports a value that is not none. Implemented an oldColor-value that allows the hat-block to trigger between color-changes, even if the sensor doesnt see 'none' in the meantime.
2019-03-01 11:36:57 -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
greenkeeper[bot]
0b6613b2c1 chore(package): update lockfile package-lock.json 2019-02-27 22:53:18 +00:00
greenkeeper[bot]
6715b2ec34 fix(package): update scratch-parser to version 4.3.5 2019-02-27 22:53:13 +00:00
Kevin Andersen
ed051cdd82 Changed color-sensing values to be strings instead of LEGO numbering, which seems more intuitive. 2019-02-27 15:49:24 -05:00
Kevin Andersen
d2d236d282 After discussion with @ericrosenbaum, decided to change the following:
- Regroup blocks by functionality, i.e. motors, led, color-sensing, etc.
- Remove motor position zero-ing as concept and use MathUtil.wrapClamp to instead wrap everything around 360 degrees.
- WIP: "Set motor power to"-block should update motors that are currently running to emphasize principle that blocks have actions.
2019-02-27 15:19:40 -05:00
Kevin Andersen
7fc705b741 - Consolidated BLE enums for brevity
- Added IOs from documentation to BoostIO enumotor follows the speed set by Scratch and not the highest possible speed.
- Cleaned up line breaks in codebrake rather than float when stopping.
- Cleaned up documentationensors
- Deleted unused MOTOR_OUTPUT from BoostMode-enumbased on BoostMode-enum
- Set default-value for "set motor power to"-block to be all motors after feedback from @ericrosenbaum
- Implemented check in getMotorPosition() to see if motor is actually there before reporting position
2019-02-26 14:44:13 -05:00
Chris Willis-Ford
bb42c0019c
Merge pull request #1998 from cwillisf/task-queue-enhancements
Task queue enhancements
2019-02-25 21:28:05 -05:00
Ray Schamp
8f4480f9b4
Merge pull request #2003 from mzgoddard/depend-on-uglify
Depend on uglifyjs-webpack-plugin
2019-02-25 16:00:19 -05:00
Katie Broida
cff1c2c0a4
Merge pull request #1959 from ktbee/declare-const-once
Declare const once to be reused in for loop
2019-02-25 15:57:52 -05:00
Karishma Chadha
475eaf3dfa
Merge pull request #1969 from mzgoddard/benchmark-more-data
Benchmark more data
2019-02-25 11:38:09 -05:00
Eric Rosenbaum
ab6a60357e
Merge pull request #2008 from ericrosenbaum/feature/vernier-block-updates
Vernier Force & Accel extension updates
2019-02-25 11:10:02 -05:00
Michael "Z" Goddard
0e9357b062
benchmark load now
This is a slight ergonomics improvement for faster benchmark loading.
We should be able to apply this to gui as well if it already does do
the same thing.
2019-02-22 16:01:09 -05:00
Michael "Z" Goddard
991acbb36a
benchmark more loading stats
- Display time to load just the (json) data
- Display progress and time for content
- Display progress and time hydrating the downloaded assets
2019-02-22 16:01:08 -05:00
Michael "Z" Goddard
84de5cdc7e
determine _pushThread defaults without Object.assign 2019-02-22 15:56:34 -05:00
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
a3dcdd01dd Merge branch 'develop' of https://github.com/LLK/scratch-vm into boostextension 2019-02-21 14:00:43 -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
Joke Book
b29f07636d
fix: Equalise the chances when picking a random backdrop 2019-02-20 21:11:27 +00:00
Eric Rosenbaum
c0e80edfcc Update block and menu icons 2019-02-20 11:13:00 -05:00
Eric Rosenbaum
931d7e9a62 More re-ordering 2019-02-20 11:00:21 -05:00
Eric Rosenbaum
9e650279a6 Re-order blocks 2019-02-20 10:59:07 -05:00
Eric Rosenbaum
7da54dd067 Add tilted any option 2019-02-20 10:49:03 -05:00
Eric Rosenbaum
a19585af75 Add tilt blocks 2019-02-19 16:09:58 -05:00
Eric Rosenbaum
ba548701e2 Set update rate to 80ms 2019-02-19 15:14:37 -05:00
Eric Rosenbaum
f4662f833f rename “tilt angle” and “spin speed” reporters 2019-02-19 15:06:03 -05:00
Eric Rosenbaum
ec2ca32ffa Remove “moved” gesture 2019-02-19 13:55:24 -05:00
Christopher Willis-Ford
e6dd3f1175 Fix TaskQueue constructor when no options passed 2019-02-15 15:20:38 -08:00
Michael "Z" Goddard
e79bed276a
depend on uglifyjs-webpack-plugin
uglifyjs-webpack-plugin is used in webpack.config.js.
2019-02-15 18:04:06 -05:00
Michael "Z" Goddard
146e93e4ec
start loading sb2 sounds before handling sb2 data 2019-02-15 17:43:55 -05:00
Michael "Z" Goddard
d4320f1c26
start loading sb2 assets before handling sb2 data 2019-02-15 17:34:14 -05:00
Karishma Chadha
a86dc5bb58
Merge pull request #1944 from mzgoddard/benchmark-load-time
Benchmark load time
2019-02-15 13:52:48 -05:00
greenkeeper[bot]
f1c7d10274 chore(package): update lockfile package-lock.json 2019-02-15 15:12:00 +00:00
greenkeeper[bot]
f64eaa3329 fix(package): update scratch-sb1-converter to version 0.2.7 2019-02-15 15:11:54 +00: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
Evelyn Eastmond
894828d54b
Merge pull request #1990 from evhan55/bug/gdxfor-tilt
Vernier gdxfor tilt values 0 when disconnected
2019-02-13 15:46:49 -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