Avoid OMG crash when emitter txpower >0

#457
This commit is contained in:
1technophile committed 2019-09-20 23:34:45 +02:00
1 parent 513cc4b7ac
commit d2dd613855
1 file changed
+1 -1
+1 -1
View File
@@ -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;