Add NanoXRP board support + XRPLib 2.3.0#2
Closed
SaintSampo wants to merge 3 commits into
Closed
Conversation
Adds the xrp-nano board to the firmware loader tree: board-level project list, MicroPython project manifest referencing the shared XRPLib 2.2.1 release, firmware version registry, and the NanoXRP UF2 build (MicroPython v1.28.0-preview, NanoXRP Controller RP2040). Pairs with the XRPWeb nanoxrp-fw-support branch, which adds the xrp-nano tile and NanoXRP wizard support in the IDE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add complete XRPLib 2.3.0 library with new features including puppet protocol support, improved buzzer library, gamepad integration, and enhanced dashboard. Update all board configurations (xrp-2350, xrp-beta, xrp-nano) to use the new library version. Includes example code, BLE support, and phew web framework.
Reset the speed controller's history when setting motor RPM to prevent stale integral windup and large timesteps from previous motor runs, ensuring consistent control behavior on restart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add NanoXRP board support + XRPLib 2.3.0
Summary
Adds the NanoXRP board to the firmware repo and introduces XRPLib 2.3.0, a
new library release that combines the NanoXRP support from the upstream
XRP_MicroPythonmainbranch with the dashboard/puppet stack already shippingin 2.2.1. The three MicroPython board projects are repointed at the new release.
What's included
1. NanoXRP board
boards/xrp-nano/— MicroPython 1.28.0 firmware (firmware.uf2+ registry),board selector (
boards/xrp-nano.json), and amicropythonproject.2. XRPLib 2.3.0 (
boards/XRPLib/2.3.0/)Built from the 2.2.1 release as a base, then the NanoXRP + buzzer work was
layered on top. Net result vs 2.2.1:
Kept from 2.2.1 (unchanged):
dashboard.py,puppet.py, the puppet/XPP-basedgamepad.py,ble/,phew/, and all shared modules/examples.Brought in from
XRP_MicroPython@main(NanoXRP support):board.py,motor.py,imu.py,encoder.py,encoded_motor.py,reflectance.py,differential_drive.py,defaults.py, plus newXRPLib/buzzer.pyandXRPExamples/buzzer_examples.py. This adds NanoXRP boarddetection (motor direction, IMU axis remap, encoder gear ratio, wheel geometry
and per-board PID gains), a buzzer module, a middle reflectance sensor, and
board-attribute-gated 4th motor / 4 servos — all guarded so existing Beta/2350
boards are unaffected.
Hand-merged:
resetbot.py— union of both lineages (keeps 2.2.1'sreset_dashboard, adds the buzzer reset and board-attribute-driven motor/servohandling).
3. Gamepad architecture decision
The two source lineages had incompatible gamepad implementations (upstream
main: BLE UART; 2.2.1: puppet/XPP). 2.3.0 keeps the puppet-based gamepad sothe dashboard continues to work. The upstream BLE gamepad path is intentionally
not carried over.
Bug fixes (folded into 2.3.0)
Three pre-existing defects in upstream
mainwere fixed while importing the code.All three still exist upstream and should be fixed there too:
differential_drive.py—track_widthnever assigned. The "centralizedefaults" refactor assigned
self.wheel_trackbut the turn/heading math readsself.track_width, which was never set →AttributeErroron encoder-based(no-IMU)
straight()/turn(). Standardized onself.track_width.differential_drive.py— explicit wheel args dropped.wheel_diam/wheel_trackwere only assigned inside the== 0.0sentinel branch, so passingan explicit non-zero value left the attribute unset →
AttributeError. Addedelsebranches so explicit values are honored and0.0still means auto-detect.encoded_motor.py— speed PID not reset onset_speed(). The persistentspeed controller kept stale integral windup and a frozen
prev_timeacrossstop→restart, causing an effort kick / timestep spike on the first update after
restart.
set_speed()now callsclear_history()when starting control.Project version references
xrplib-2.3.0is registered as the newest entry inboards/XRPLib/index.json.Generation & verification
files.jsonregenerated with the standardgen-firmware-manifests.mjslogic(verified byte-for-byte against the tool's output);
xrplib.zipLSP stub bundlerebuilt to include
buzzer.pyand the fixes.CRLF-consistent with the rest of the repo.