Telemetry fixes
This commit is contained in:
@@ -400,6 +400,21 @@ PACK(struct TelemetrySensor {
|
||||
bool isPrecConfigurable() const;
|
||||
int32_t getPrecMultiplier() const;
|
||||
int32_t getPrecDivisor() const;
|
||||
bool isSameInstance(TelemetryProtocol protocol, uint8_t instance)
|
||||
{
|
||||
if (protocol == TELEM_PROTO_FRSKY_SPORT) {
|
||||
if (((this->instance ^ instance) & 0x9F) == 0) {
|
||||
this->instance = instance; // update the instance in case we had telemetry switching
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return this->instance == instance;
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user