Rb10 support (#4015)
* Rb10 support * Even more thorough check * A simpler test for the more complex scenario :) (thx Bsongis :))
This commit is contained in:
@@ -186,7 +186,18 @@ void sportProcessTelemetryPacket(uint8_t * packet)
|
||||
sportProcessTelemetryPacket(id, 1, instance, data >> 16);
|
||||
}
|
||||
else if (id >= RBOX_STATE_FIRST_ID && id <= RBOX_STATE_LAST_ID) {
|
||||
uint16_t newServosState = data & 0xffff;
|
||||
bool static isRB10 = false;
|
||||
uint16_t newServosState;
|
||||
|
||||
if (servosState == 0 && (data & 0xff00) == 0xff00) {
|
||||
isRB10 = true;
|
||||
}
|
||||
if (isRB10) {
|
||||
newServosState = data & 0x00ff; // 8ch only RB10
|
||||
}
|
||||
else {
|
||||
newServosState = data & 0xffff;
|
||||
}
|
||||
if (newServosState != 0 && servosState == 0) {
|
||||
audioEvent(AU_SERVO_KO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user