Add optional FrSky SmartPort (S.Port) telemetry#372
Open
robthomson wants to merge 3 commits into
Open
Conversation
Author
|
In an idea world for this PR; the epprom would have change to allow the protocol to be set. |
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 optional FrSky SmartPort (S.Port) telemetry
Branch:
sport→mainSummary
Adds FrSky S.Port ESC slave telemetry as an optional compile-time feature. When enabled, the ESC responds to S.Port polls from a FrSky/ELRS receiver directly, replacing KISS telemetry on the signal wire. All existing behaviour is unchanged when the flag is not set.
Build with:
What's included
New files
Inc/sport_telemetry.h— protocol constants and public APIInc/telemetry_protocol.h— baud-rate abstraction (57600 vs 115200) used by MCU UART initSrc/sport_telemetry.c— S.Port slave state machine, frame builder, and ESC config protocolMakefile
USE_SPORT_TELEMETRY=1adds-DUSE_SPORT_TELEMETRYto CFLAGS; no effect on any existing buildAll MCU
serial_telemetry.cfilesAll changes guarded by
#ifdef USE_SPORT_TELEMETRY:#warning— external inverter required)Mcu/g071/Src/stm32g0xx_it.cUSART1_IRQHandleradded (sport only): handles RXNE byte receipt, RTO-triggered DMA transmit, and TC-triggered switchback to RX. DMA CH3 TC/TE handlers extended for sport TX teardown.Src/main.cSport path clears
send_telemetryflag without calling KISS functions; KISS info-packet path guarded.Src/kiss_telemetry.caTxBufferdefinition and KISS functions wrapped in#ifndef USE_SPORT_TELEMETRYto prevent linker conflict.Telemetry data sent
Round-robin across 6 slots per poll:
ESC config protocol
S.Port config sensor (physical ID 0x0D) supports PING / GET / SET / SAVE commands over the same wire. 28 parameters are accessible:
Configuration
An ethos lua app to configure the esc via s.port can be found here
https://github.com/robthomson/am32-ethos-configurator
Tested on