VC++ compilation fix
This commit is contained in:
+1
-19
@@ -381,25 +381,7 @@ PACK(struct TelemetrySensor {
|
||||
bool isPrecConfigurable() const;
|
||||
int32_t getPrecMultiplier() const;
|
||||
int32_t getPrecDivisor() const;
|
||||
bool isSameInstance(TelemetryProtocol protocol, uint8_t instance)
|
||||
{
|
||||
if (this->instance == instance)
|
||||
return true;
|
||||
|
||||
if (protocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||
#if defined(SIMU)
|
||||
if (((this->instance ^ instance) & 0x1F) == 0)
|
||||
return true;
|
||||
#else
|
||||
if (((this->instance ^ instance) & 0x9F) == 0 && (this->instance >> 5) != TELEMETRY_ENDPOINT_SPORT && (instance >> 5) != TELEMETRY_ENDPOINT_SPORT) {
|
||||
this->instance = instance; // update the instance in case we had telemetry switching
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
bool isSameInstance(TelemetryProtocol protocol, uint8_t instance);
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -720,3 +720,23 @@ int32_t TelemetrySensor::getPrecDivisor() const
|
||||
if (prec == 1) return 10;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool TelemetrySensor::isSameInstance(TelemetryProtocol protocol, uint8_t instance)
|
||||
{
|
||||
if (this->instance == instance)
|
||||
return true;
|
||||
|
||||
if (protocol == PROTOCOL_TELEMETRY_FRSKY_SPORT) {
|
||||
#if defined(SIMU)
|
||||
if (((this->instance ^ instance) & 0x1F) == 0)
|
||||
return true;
|
||||
#else
|
||||
if (((this->instance ^ instance) & 0x9F) == 0 && (this->instance >> 5) != TELEMETRY_ENDPOINT_SPORT && (instance >> 5) != TELEMETRY_ENDPOINT_SPORT) {
|
||||
this->instance = instance; // update the instance in case we had telemetry switching
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user