New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FrSky SPI RX support (with MIDELICF3 target as example) #3682
Conversation
src/main/telemetry/frsky.h
Outdated
@@ -22,10 +22,13 @@ typedef enum { | |||
FRSKY_VFAS_PRECISION_HIGH | |||
} frskyVFasPrecision_e; | |||
|
|||
typedef void frSkyTelemetryInitFrameFunc(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although not all code complies, standard suffix for function pointer is FnPtr
so this should be frSkyTelemetryInitFrameFnPtr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't a pointer, just function prototype. Which is IMO good idea (* in variable definition marks pointer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I wasn't thinking clearly there. Revised comment: standard suffix for function typedef is Fn
, so this should be frSkyTelemetryInitFrameFn
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, will fix. Will have to fix pwm_output.h
as well, as this is what I used as a template.
src/main/rx/frsky_d.c
Outdated
#if defined FRSKY_TELEMETRY | ||
static void compute_RSSIdbm(uint8_t *packet){ | ||
if(packet[ccLen-2] >=128){ | ||
RSSI_dBm =((((uint16_t)packet[ccLen-2])*18)>>5)- 82; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you convert 8-space indenting to 4-space?
Looks good. Although I don't think it needs to be fully compliant with coding standards before inclusion, it would be good to get some of the gross non-compliance sorted, in particular 8-space indenting and K&R braces style. |
Is it plan to implement also X series telemetry? |
@martinbudden: I can do that. I was trying out different IDEs before I left for the holidays for the quality of the auto-formatting that they offer for C. Is there one that you can recommend for this? You wouldn't happen to have the hardware and time to test that serial FrSky hub telemetry still works with this PR? |
c52d6d1
to
9835b5b
Compare
9835b5b
to
ea1e146
Compare
added more files/target mods typo error/cosmetics mod telemetry files cosmetics update to full telemetry Add images telemetry select default info readme activate full telemetry added FrskyRX main files added info cosmetics fix telemetry buffer range fix range fix telemetry buffer typo fix added MIDELICF3V2 target cosmetics a2 telemetry fix change status LED pin for production board telemetry fix telemetry fix forgot to add bind via cli Fixes to make MIDELICF3 build. Switched FrSky bind information to PG. Added 'autoBind' as a config setting. Some fixups. Fixed binding (Langkawi edit). Made FrSky binding non-blocking. Fixups before PR. Fixed telemetry integration.
ea1e146
to
2bca106
Compare
@martinbudden: Fixed the formatting. VS Code does a good job, after some wrangling with clang-format settings. |
Closed. Will submit new PR for 3.3. |
For discussion about inclusion in 3.2.
This adds support for CC2500 based FrSky SPI RX. The rx code still needs more work to be brought in line with Betaflight coding standards, but the shared code has been cleaned up, and conflicts resolved.
The MIDELICF3 target definition is included as an example of how to add a FrSky SPI RX to a board, and to add build coverage for the FrSky SPI RX code. It will be replaced by the FREUNDF3 target (which will be commercially available) when this is finalised.