mirror of
https://github.com/opentx/opentx.git
synced 2025-07-14 11:59:50 +03:00
Send 0 with getRSSI when no telem
This commit is contained in:
parent
2d1276f081
commit
24fdbcbbab
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue