From d2dd6138558909b71cc44f69665340247bd5f356 Mon Sep 17 00:00:00 2001 From: 1technophile <1technophile@users.noreply.github.com> Date: Fri, 20 Sep 2019 23:34:45 +0200 Subject: [PATCH] Avoid OMG crash when emitter txpower >0 #457 --- main/ZgatewayBT.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index cb298a7..84593dd 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -724,7 +724,7 @@ void haRoomPresence(JsonObject& HomePresence){ trc(F("BLErssi")); trc(BLErssi); int txPower = HomePresence["txpower"]|0; - if (txPower == 0) txPower = -59; //if tx power is not found we set a default calibration value + if (txPower >= 0) txPower = -59; //if tx power is not found we set a default calibration value trc(F("txPower")); trc(txPower); double ratio = BLErssi*1.0/txPower;