Skip to content

feat(joystick): add CRC-8 packet checksum and region-based XY sensiti…#570

Open
veerwang wants to merge 1 commit into
Cephla-Lab:masterfrom
veerwang:octoaxes
Open

feat(joystick): add CRC-8 packet checksum and region-based XY sensiti…#570
veerwang wants to merge 1 commit into
Cephla-Lab:masterfrom
veerwang:octoaxes

Conversation

@veerwang

@veerwang veerwang commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

…vity

Port control-panel firmware changes into firmware/joystick:

  • Add CRC-8-CCITT (poly 0x07) checksum over packet[0..8] into packet[9], matching firmware/octoaxes/serial.cpp. Remap a computed 0x00 to 0x01 so that 0 stays reserved as the legacy "no CRC" marker for old firmware.
  • Add REGION_OVERSEAS build flag: overseas joystick X/Y sensitivity factor is /4 (2x output at the same detent) versus /8 for the domestic default. Provide teensyLC (domestic) and teensyLC_overseas PlatformIO envs.
  • Mark encoder_step_size volatile since it is shared with the encoder ISR.
  • Compute the Z encoder step with integer bit-shift (1 << input_sensitivity_z, capped at 256) instead of pow(), avoiding float math.
  • Add download.sh helper to flash the domestic or overseas build.

…vity

Port control-panel firmware changes into firmware/joystick:

- Add CRC-8-CCITT (poly 0x07) checksum over packet[0..8] into packet[9],
  matching firmware/octoaxes/serial.cpp. Remap a computed 0x00 to 0x01 so
  that 0 stays reserved as the legacy "no CRC" marker for old firmware.
- Add REGION_OVERSEAS build flag: overseas joystick X/Y sensitivity factor
  is /4 (2x output at the same detent) versus /8 for the domestic default.
  Provide teensyLC (domestic) and teensyLC_overseas PlatformIO envs.
- Mark encoder_step_size volatile since it is shared with the encoder ISR.
- Compute the Z encoder step with integer bit-shift (1 << input_sensitivity_z,
  capped at 256) instead of pow(), avoiding float math.
- Add download.sh helper to flash the domestic or overseas build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant