1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 11:29:51 +03:00

Rationalize

This commit is contained in:
3djc 2021-02-02 15:34:06 +01:00
parent 91cd92e2b9
commit d92022a5e9
2 changed files with 0 additions and 8 deletions

View file

@ -69,9 +69,6 @@ const CrossfireSensor & getCrossfireSensor(uint8_t id, uint8_t subId)
void processCrossfireTelemetryValue(uint8_t index, int32_t value) void processCrossfireTelemetryValue(uint8_t index, int32_t value)
{ {
if (!TELEMETRY_STREAMING())
return;
const CrossfireSensor & sensor = crossfireSensors[index]; const CrossfireSensor & sensor = crossfireSensors[index];
setTelemetryValue(PROTOCOL_TELEMETRY_CROSSFIRE, sensor.id, 0, sensor.subId, value, sensor.unit, sensor.precision); setTelemetryValue(PROTOCOL_TELEMETRY_CROSSFIRE, sensor.id, 0, sensor.subId, value, sensor.unit, sensor.precision);
} }

View file

@ -84,18 +84,13 @@ const GhostSensor *getGhostSensor(uint8_t id)
void processGhostTelemetryValue(uint8_t index, int32_t value) void processGhostTelemetryValue(uint8_t index, int32_t value)
{ {
if (!TELEMETRY_STREAMING())
return;
const GhostSensor * sensor = getGhostSensor(index); const GhostSensor * sensor = getGhostSensor(index);
setTelemetryValue(PROTOCOL_TELEMETRY_GHOST, sensor->id, 0, 0, value, sensor->unit, sensor->precision); setTelemetryValue(PROTOCOL_TELEMETRY_GHOST, sensor->id, 0, 0, value, sensor->unit, sensor->precision);
} }
void processGhostTelemetryValueString(const GhostSensor * sensor, const char * str) void processGhostTelemetryValueString(const GhostSensor * sensor, const char * str)
{ {
if (TELEMETRY_STREAMING()) {
setTelemetryText(PROTOCOL_TELEMETRY_GHOST, sensor->id, 0, 0, str); setTelemetryText(PROTOCOL_TELEMETRY_GHOST, sensor->id, 0, 0, str);
}
} }
bool checkGhostTelemetryFrameCRC() bool checkGhostTelemetryFrameCRC()