mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 03:19:53 +03:00
Rationalize
This commit is contained in:
parent
d92022a5e9
commit
0652fa609b
2 changed files with 2 additions and 6 deletions
|
@ -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:
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue