fix: Quick fix to let CRSF be used with MPM wireless trainer - limiations apply (#1724)

* Let's do some dirty hack with MPM RX

Resolves #1671

* Use the right function to sync and shutdown sync on external MPM as well
This commit is contained in:
Raphael Coeffic
2022-03-25 12:04:15 +10:00
committed by GitHub
parent b359e2db71
commit 50aeb50029
6 changed files with 28 additions and 15 deletions
+10
View File
@@ -244,6 +244,16 @@ static void processMultiStatusPacket(const uint8_t * data, uint8_t module, uint8
if (wasBinding && !status.isBinding() && getMultiBindStatus(module) == MULTI_BIND_INITIATED)
setMultiBindStatus(module, MULTI_BIND_FINISHED);
// Dirty RX protocol detection
size_t proto_len = strnlen(status.protocolName, 8);
if (proto_len >= 2 &&
status.protocolName[proto_len - 2] == 'R' &&
status.protocolName[proto_len - 1] == 'X') {
status.isRXProto = true;
} else {
status.isRXProto = false;
}
// update timestamp last to avoid race conditions
status.lastUpdate = get_tmr10ms();
}