Commit graph

458 commits

Author SHA1 Message Date
Kevin Andersen
330fcc5297 Merge branch 'boostextension' of https://github.com/knandersen/scratch-vm into boostextension 2019-04-01 06:40:18 -04:00
Kevin Andersen
7f0355169e Cleaned up documentation and removed extra line breaks in response to @evhan55 PR comments 2019-04-01 06:38:29 -04:00
Kevin Nørby Andersen
b608a4856b
Merge branch 'develop' into boostextension 2019-03-27 10:21:32 -07:00
Eric Rosenbaum
138af7a491 Stabilize facing up and facing down 2019-03-25 15:15:45 -04:00
Eric Rosenbaum
b5bdc20d13 Move facing options into gesture menu 2019-03-22 17:13:46 -04:00
Eric Rosenbaum
b3ef49a8bb Add Hindi language to Text to Speech 2019-03-21 16:06:42 -04:00
Kevin Andersen
601c9d230f Moved Scratch3BoostBlocks-functions around so that they are properly grouped, i.e. motors, tilt, color, etc 2019-03-21 14:50:39 -04:00
Kevin Andersen
256758122d Merge changes from LLK/develop 2019-03-21 14:11:27 -04:00
Kevin Andersen
64355e8584 changed BoostColorSampleSize to 5 to avoid false readings of black 2019-03-21 14:01:49 -04:00
Kevin Andersen
20967fe768 changed wording of setMotorPower-block to use speed instead of power 2019-03-21 13:56:47 -04:00
Kevin Andersen
02d047cfbd Stabilized color-sensing by:
- Creating Boost._colorBucket will contains BoostColorSampleSize-amount of samples
- Boost._onMessage administers the _colorBucket and assigns Boost._sensors.color a value if all items in the bucket match.

E.g. if BoostColorSampleSize is set to 3, three continuous readings of the same color are required for the color to be detected by scratch-vm.
2019-03-21 13:46:51 -04:00
Eric Rosenbaum
1339841bc4 Remove Hindi from text2speech extension
Low quality speech synthesis, needs investigation
2019-03-21 11:00:43 -04:00
Kevin Andersen
bfb61c0df4 - Removed unused IOs
- Renamed BoostOutputCommandFeedback to BoostPortFeedback and its values for brevity
- Removed buf2hex-function
- Removed BoostMotor._pendingPositionOrigin (unused)
- Removed Boost._led (unused)
- Simplified _onMessage-handling of BoostPortFeedback-messages
- motorOnForRotation() now returns a Promise.all rather than a single promise. This solves  two bugs:
-- when running turn ABCD for 3 rotations without motors connected to CD, the block would finish yielding immediately.
-- when running turn C for X rotations without a motor connected to C, the motor would never finish yielding.
2019-03-20 13:50:24 -04:00
Kevin Andersen
5f6c8b1efd Reworked motor-system to allow the setMotorPower- and setMotorDirection-blocks to modify the motor behavior if the motor is already running.
- BoostMotor-class now has pendingPositionDestination, the rotation-equivalent of pendingTimeout, that stores a destination the motor should reach. When using setMotorPower() or setMotorDirection() while a motorOnForRotation()-block is running, a new motorOnForRotation()-command will be run for the remaining amount of degrees but with new power/direction, cancelling the old command.
- BoostMotor._status is only affected by feedback from the hub.
- setMotorPower() and setMotorDirection() no longer yields, since they just set state.

From design meeting regarding block design:
- Renamed all motors-label to ABCD.
- Added 'AB' motor label to address built-in motor pair.
- use the word direction in the setMotorDirection-block
- moved argument label in motor position reporter
- changed wording of color-sensing block.
- removed isTilted-boolean reporter
- removed changeLightHueBy-block

- fixed pingDevice-function bug.
2019-03-19 18:34:12 -04:00
Eric Rosenbaum
55257c0bf7 Localize name of Text to Speech extension 2019-03-19 12:24:51 -04:00
Eric Rosenbaum
68e7f24bb9
Revert "Rate limiting for micro:bit using TaskQueue" 2019-03-18 10:16:50 -04:00
Eric Rosenbaum
7f69e0ce3f
Merge pull request #2046 from ericrosenbaum/feature/tts-add-single-language-voices2
Add eight new languages to Text to Speech extension
2019-03-14 16:42:07 -04:00
Kevin Andersen
55ccc4e77a Implemented pingDevice() which, like the WeDo 2.0 extension, tries to read from the Boost Hub at a given interval. If it doesn't hear back from the hub, it assumes the device has been disconnected. 2019-03-13 14:35:53 -04:00
Kevin Andersen
873b56c985 - Motor-power functionality changed!
-- Using a max-power setting of 100 rather than following the speed in the motor-commands will allow motors to run at really slow speeds.
-- As a result, motor-commands now use max-power of 100 regardless of speed and setMotorPower no longer scales according to a minimum speed of 20.
- BLE-rate enums consolidated into BoostBLE enum
2019-03-12 17:35:43 -04:00
Eric Rosenbaum
bed0b05bc9 Log error instead of returning null 2019-03-12 14:29:39 -04:00
Eric Rosenbaum
580e93d15a fix norwegian id 2019-03-07 17:00:48 -05:00
Eric Rosenbaum
9455112d74 improve variable name 2019-03-07 17:00:40 -05: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
Eric Rosenbaum
59586291d7 Comments 2019-03-06 12:03:54 -05:00
Eric Rosenbaum
ee0d395b9c Cleanup check supported and get extension locale 2019-03-06 12:03:46 -05:00
Eric Rosenbaum
8fc3111b21 use id for default language 2019-03-06 10:51:08 -05:00
Eric Rosenbaum
65d0a3aa11 cleanup 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
d059f8baa6 Check and set language, handling many-to-one mapping 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
ab633d3448 WIP updating to use new language info data 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
bc9e215ee8 Fill in language info data 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
04c6bc189a Add language ids 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
da212bcf06 wip switching from using locales to language IDs internally 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
920096d061 Add romanian and fix ordering 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
3996cc0c6b Add Welsh, Swedish and Turkish 2019-03-06 10:37:36 -05:00
Eric Rosenbaum
f33e07132e Add hindi, korean, norwegian, and adjust rates 2019-03-06 10:37:36 -05:00