New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 2215 by properly remapping ports to fit new firmware changes #2229
Conversation
Blocked by scratchfoundation/scratch-link#120 |
This breaks old-firmware Boosts... |
/cc @ericrosenbaum @cwillisf @BryceLTaylor We should discuss how to handle communication and support for Boost hubs that are running the older firmware as @apple502j points out above. |
…ater as well as newer firmware version 2.0.00.0017 or newer
…lity. This change creates two different port mappings for the Move Hub. By default the extension will use the newer mapping introduced in firmware version 1.0.00.0224. When connected to the hub, the extension will request the hub's firmware version. If it's older than 1.0.00.0224 it will use the older mapping.
🎉 Thanks @knandersen! |
Looks like ports C and D are now set incorrectly for the old firmware |
Motor position reporter for port A is not working- I think it's because the |
…e the port number was false-y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested on mac chrome with Scratch Link 1.1.46, with both old and new BOOST firmware versions.
… extension/microbit-more * 'develop' of https://github.com/yokobond/scratch-vm: (79 commits) Revert "Update gh-pages to the latest version 🚀" chore(package): update lockfile package-lock.json chore(package): update gh-pages to version 2.1.0 Fixed issue where port A motor position was not being reported because the port number was false-y Corrected old port mapping! Thanks for catching that @EricR. Adjusted portmapping variables to match firmware versions correctly This commit addresses a discussion in scratchfoundation#2229 around backward compatibility. Add port mappings to support older firmware version 2.0.00.0016 and later as well as newer firmware version 2.0.00.0017 or newer Revert "Raise params to the next frame when pushing" fix stopThisScript inside procedures Added START_POWER enum to BoostOutputSubCommand which allows the extension to use unregulated motor commands with the Move Hub. Changed BoostMotor.turnOff() to use unregulated motor commands since it seems like a more reliable way of turning the motor off Add case to onMessage to catch responses from the LED Changed port-mapping to reflect firmware update. chore(package): update lockfile package-lock.json chore(package): update lodash.defaultsdeep to version 4.6.1 Lint (remove logs, add spaces) test stopThisScript in procedures Making constants decimals. Fixing enum var name again. Adding 'byte to follow' comments back. ...
Resolves
Resolves the part of #2215 that relates to block behavior, NOT connection issues.
Proposed Changes
This PR changes port mapping as such:
Port
A
:55
is now0
Port
B
:56
is now1
Port
C
:1
is now2
Port
D
:2
is now3
Additionally it adds a
case
inonMessage()
that catches responses from the LED to avoid warnings from appearing in the browser console.Reason for Changes
LEGO has released a new firmware version 2.0.00.0017 for the LEGO BOOST Move Hub. The release included changes to the IDs that physical ports map to, and adds responses to LED commands.