Commit graph

114 commits

Author SHA1 Message Date
Christopher Willis-Ford
4a15205d75 correctly handle JSON-RPC requests with ID=0 2022-04-29 10:58:23 -07:00
Christopher Willis-Ford
c59af735ef support Scratch Link on ws://127.0.0.1:20111 2022-02-16 15:02:35 -08:00
adroitwhiz
1aa38db4e6 replace nets with Fetch API 2021-02-19 10:56:33 -05:00
DD Liu
7c652246df
Merge pull request #2356 from adroitwhiz/cast-to-black
Cast malformed color hex strings to RGBA 0,0,0,255 instead of null
2020-09-03 15:52:52 -04:00
jokebookservice1
57445a4d49
Merge branch 'develop' into fix/random-costume 2020-05-07 16:11:08 +01:00
adroitwhiz
112989da0e Cast malformed color hex strings to black 2020-05-01 14:50:39 -04:00
Karishma Chadha
5be322c1d5
Merge pull request #2192 from apple502j/list-cast-safely
Fix Cast.LIST_ALL casting case
2019-09-17 17:53:00 -07:00
Karishma Chadha
30ee33c50a
Merge pull request #2146 from adroitwhiz/no-ie-hacks
Remove Internet Explorer-specific Number.isNaN polyfill
2019-09-17 09:29:40 -07:00
apple502j
558f43a3d6 Fix Cast.LIST_ALL casting case 2019-06-01 14:43:53 +09:00
Paul Kaplan
706354d2f0 Update documentation about required methods on ScratchLinkSocket
Co-Authored-By: chrisgarrity <chrisg@media.mit.edu>
2019-05-31 08:55:20 -04:00
Paul Kaplan
64cff3d161 Fix documentation on what methods to implement for ScratchLinkSocket
Co-Authored-By: chrisgarrity <chrisg@media.mit.edu>
2019-05-31 08:41:20 -04:00
Paul Kaplan
94afd58b2f Require handleMessage to be set before opening scratch-link-socket 2019-05-31 08:35:27 -04:00
Paul Kaplan
5e626eb7e9 Initial prototype of configurable scratch link socket 2019-05-24 12:51:58 -04:00
adroitwhiz
3410f42e5e Remove Number.isNaN IE polyfill 2019-04-25 16:41:51 -04:00
Kevin Andersen
ecbbacd4c0 It seems like there's a tradeoff between how we choose to set the max power of the motors. Previously, I had set the motors' max power (torque) to follow their target speed, meaning they accelerated smoothly, but also lost their torque. Then in the following commit I changed the max power to 100 which means maximum torque to achieve the target speed, which resulted in very abrupt accelerations and erratic motor movement when changing speeds:
873b56c985

In the following commit I changed the functionality so that we add a fixed amount (10) more power than the target speed, e.g. for speed 50 it would provide power 60. This is fine for high speeds, but for low speeds it provides poor torque:

e3cdbffa2a

I assume it would be possible to design some sort of calculation that enabled high torque for low speeds, and vice versa. I will discuss with the team.
2019-04-08 17:56:54 -04:00
Joke Book
4b3234c9d8
Resolve linting issues 2019-03-11 23:51:27 +00:00
Joke Book
7e2012c805
Switch algorithm to map most things to +1 2019-03-11 22:01:11 +00:00
Joke Book
7e23168913
Remove and fix comments 2019-03-11 21:59:03 +00:00
Joke Book
43faf2a64d
Use a utility function for random number picking 2019-03-09 14:30:17 +00:00
Christopher Willis-Ford
e6dd3f1175 Fix TaskQueue constructor when no options passed 2019-02-15 15:20:38 -08:00
Christopher Willis-Ford
be040f4c9b TaskQueue: Add option for max total cost 2019-02-12 18:57:58 -08:00
Christopher Willis-Ford
2a9a3b11b9 TaskQueue: support canceling a single task 2019-02-12 18:11:13 -08:00
Christopher Willis-Ford
d27dc5d54a TaskQueue: reduce number of async steps before task runs 2019-02-11 12:46:48 -08:00
Christopher Willis-Ford
5a17bb1451 Add clearTimeout to Timer and MockTimer 2019-02-11 12:14:44 -08:00
Christopher Willis-Ford
46a1ae83a0 Use MockTimer for TaskQueue tests 2019-02-07 16:35:33 -08:00
Christopher Willis-Ford
7f80fe17b3 Build a mock Timer class and add tests for it 2019-02-07 16:35:32 -08:00
Karishma Chadha
c761a9c82e Fix issue where non-strings were getting passed in to escape functions for handling special characters that can appear in xml. Add tests. 2019-02-07 11:58:10 -05:00
Paul Kaplan
765f2b2549
Merge pull request #1983 from picklesrus/broadcast-msg-chars
Broadcast msg chars
2019-02-07 08:32:55 -05:00
Paul Kaplan
6deab79903
Merge pull request #1979 from paulkaplan/share-blocks-new-ids
Add a utility for giving blocks new IDs, use it for sharing blocks.
2019-02-07 08:31:25 -05:00
picklesrus
b904f19c1d Fix loading broadcast messages with special characters for projects that were converted from 2.0. 2019-02-06 16:58:46 -05:00
Paul Kaplan
31fbcfa4d7 Add a utility for giving blocks new IDs, use it for sharing blocks. 2019-02-06 10:16:22 -05:00
Karishma Chadha
af0bebb773
Fix typo in comment 2019-02-04 23:33:18 -05:00
Karishma Chadha
d91c19434f Rename util function to be more descriptive. Refactor parameters to remove unused code. 2019-02-04 19:05:28 -05:00
Karishma Chadha
7faddb6c8f Replace xml-unsafe chars in sb3 variables. 2019-02-04 15:32:01 -05:00
Karishma Chadha
57f112cbfd Remove unsafe chars from variable ids when importing from 2.0. 2019-02-04 10:29:24 -05:00
Paul Kaplan
4fe06153d6
Merge pull request #1809 from paulkaplan/serialize-infinity
Serialize Infinity and NaN to 0
2018-12-05 08:28:50 -05:00
Paul Kaplan
7e96ef2985 Serialize Infinity and NaN to 0 2018-12-04 10:52:49 -05:00
Katie Broida
967cab8f20
Make the wait block's logic and behavior more consistent with Scratch 2 (#1759) 2018-12-04 10:35:42 -05:00
DD Liu
122443a75f
Merge pull request #1754 from bocoup/handle-infinity
Make Scratch 3 comparisons with +/-Infinity match Scratch 2
2018-11-29 14:31:10 -05:00
Valerie R Young
8c2da6b56a Satisfy linter 2018-11-29 14:07:27 -05:00
Valerie R Young
70f00e30c4 Revert changes to toNumber, fix comparison of infinity in cast.compare 2018-11-27 17:53:20 -05:00
Evelyn Eastmond
9c3518ba6d Adding check for open request before calling reject/resolve. Resolves #1764. 2018-11-27 09:43:53 -05:00
Valerie R Young
3fe1d3bf6d Minor typo 2018-11-13 14:58:28 -05:00
Valerie R Young
43c5d5c053 Correct infinity comparisons and toNumber 2018-11-13 13:51:12 -05:00
Karishma Chadha
87244b4110 Normalize capitalization of sensing_current block fields during sb2 import and during monitor id generation. Update monitors integration test to include sensing_current block monitors. 2018-11-08 14:11:30 -05:00
Karishma Chadha
5db3db3a92 monitor id getter should use block fields instead of a list of strings 2018-11-08 01:33:26 -05:00
Karishma Chadha
0e7eae98d5 Separate out monitors for blocks reporter blocks that have parameters. 2018-11-08 00:37:28 -05:00
Michael "Z" Goddard
ec414fffc6
use Number.isNaN in Cast.toNumber
Number.isNaN does not coerce and may help performance since we either
do not need to coerce the value or already have with Number.
2018-10-31 14:40:19 -04:00
Michael "Z" Goddard
5b10d41ba3
check if toNumber is given a number and shortcut if so
If toNumber is called on a number avoiding passing the number to Number
can provide a small performance improvement.
2018-10-30 11:28:22 -04:00
Andrew Sliwinski
853de9fa7d
Merge pull request #1593 from joker314/fix/compare-strings
Fix locale-dependant string comparison operators to match 2.0
2018-10-04 14:38:40 -04:00