tryfix crash (#2964)

* tryfix crash

* only use this when wifi is not enabled. (poking around)

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Thomas Göttgens
2023-12-02 07:00:20 -06:00
committed by GitHub
co-authored by GitHub Ben Meadors
parent 4c69d06ac0
commit 1b6c11c5f1
2 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -320,7 +320,9 @@ meshtastic_NodeInfoLite *MeshService::refreshLocalMeshNode()
position.time = getValidTime(RTCQualityFromNet);
updateBatteryLevel(powerStatus->getBatteryChargePercent());
if (powerStatus->getHasBattery() == 1) {
updateBatteryLevel(powerStatus->getBatteryChargePercent());
}
return node;
}