mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
TBS Crossfire SerialRX protocol and telemetry (grafting from Betaflight)
Inject link quality to virtual channel 17 for CRSF telemetry, change to integer arithmetic for channel value conversion Rename USE_PWM and USE_PPM to USE_RX_PWM and USE_RX_PPM
This commit is contained in:
parent
a966135eb5
commit
4f250b96c4
22 changed files with 849 additions and 130 deletions
|
@ -459,6 +459,19 @@ uint16_t crc16_ccitt(uint16_t crc, unsigned char a)
|
|||
return crc;
|
||||
}
|
||||
|
||||
uint8_t crc8_dvb_s2(uint8_t crc, unsigned char a)
|
||||
{
|
||||
crc ^= a;
|
||||
for (int ii = 0; ii < 8; ++ii) {
|
||||
if (crc & 0x80) {
|
||||
crc = (crc << 1) ^ 0xD5;
|
||||
} else {
|
||||
crc = crc << 1;
|
||||
}
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
float bellCurve(const float x, const float curveWidth)
|
||||
{
|
||||
return powf(M_Ef, -sq(x) / (2.0f * sq(curveWidth)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue