Skip to content

Enhance ESC control with LED patterns and motor beep functionality#111

Open
zjwhitehead wants to merge 6 commits intoble-pairingfrom
led-beeping
Open

Enhance ESC control with LED patterns and motor beep functionality#111
zjwhitehead wants to merge 6 commits intoble-pairingfrom
led-beeping

Conversation

@zjwhitehead
Copy link
Copy Markdown
Member

No description provided.

PaulDWhite and others added 6 commits April 10, 2026 11:36
- Update SINE-ESC-CAN library to v0.0.4 (led-control branch) which adds
  SetLedControl (Data ID 218) and includes SetMotorSound (Data ID 214)
- Add setMotorSound() to SineEsc class to wire up motor beep protocol
- Add ESC LED aviation strobe pattern (red/green double pulse)
- Add motor beep on arm (ascending tone) and disarm (descending tone)
  matching the hand controller buzzer cadence
- Rename LED_RED/GREEN/YELLOW macros to NEOPIXEL_* to avoid collision
  with SineEsc::LedPattern enum

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce EscStatusLightMode and new APIs to request ESC status light mode and queue motor beeps; centralize ESC LED/tone logic in esc.cpp (syncEscOutputs, sendEscStatusLight, pending tone queue) and call it from readESCTelemetry. Rename and simplify motor-sound API (setESCMotorSound signature changed) and replace immediate beep/LED task functions with queue/request versions (startESCLedStrobeTest, escMotorBeepArm/Disarm removed). Rename NEOPIXEL_* color macros to STATUS_LED_* and update usages in main.cpp. Update main to request ESC status light mode based on connection, battery/OTA/state and to queue arm/disarm beeps. Also bump SINE-ESC-CAN dependency reference in platformio.ini to a newer commit.
Delete deprecated setESCLedControl and setESCMotorSound functions: remove their declarations from inc/sp140/esc.h and implementations from src/sp140/esc.cpp. These wrappers simply forwarded to esc.setLedControl/esc.setMotorSound and checked escTwaiInitialized; the public interface is being simplified in favor of requestEscStatusLightMode and the queueEscMotorBeep* helpers.
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.

2 participants