Enhance ESC control with LED patterns and motor beep functionality#111
Open
zjwhitehead wants to merge 6 commits intoble-pairingfrom
Open
Enhance ESC control with LED patterns and motor beep functionality#111zjwhitehead wants to merge 6 commits intoble-pairingfrom
zjwhitehead wants to merge 6 commits intoble-pairingfrom
Conversation
- 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.
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.
No description provided.