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

Rationalize

This commit is contained in:
3djc 2021-02-02 15:43:31 +01:00
parent d92022a5e9
commit 0652fa609b
2 changed files with 2 additions and 6 deletions

View file

@ -260,7 +260,7 @@ void luaGetValueAndPush(lua_State* L, int src)
if (src >= MIXSRC_FIRST_TELEM && src <= MIXSRC_LAST_TELEM) {
div_t qr = div(src-MIXSRC_FIRST_TELEM, 3);
// telemetry values
if (TELEMETRY_STREAMING() && telemetryItems[qr.quot].isAvailable()) {
if (telemetryItems[qr.quot].isFresh()) {
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[qr.quot];
switch (telemetrySensor.unit) {
case UNIT_GPS:

View file

@ -47,11 +47,7 @@ inline bool TELEMETRY_STREAMING()
inline bool MODEL_TELEMETRY_STREAMING()
{
if ( g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_GHOST) {
return modelTelemetryStreaming;
}
return TELEMETRY_STREAMING() && modelTelemetryStreaming > 0;
return modelTelemetryStreaming > 0;
}
enum TelemetryStates {