1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-14 03:49:52 +03:00

Send 0 with getRSSI when no telem

This commit is contained in:
3djc 2021-02-15 13:10:29 +01:00
parent 2d1276f081
commit 24fdbcbbab

View file

@ -1411,7 +1411,10 @@ Get RSSI value as well as low and critical RSSI alarm levels (in dB)
*/
static int luaGetRSSI(lua_State * L)
{
lua_pushunsigned(L, min((uint8_t)99, TELEMETRY_RSSI()));
if (TELEMETRY_STREAMING())
lua_pushunsigned(L, min((uint8_t)99, TELEMETRY_RSSI()));
else
lua_pushunsigned(L, 0);
lua_pushunsigned(L, g_model.rssiAlarms.getWarningRssi());
lua_pushunsigned(L, g_model.rssiAlarms.getCriticalRssi());
return 3;