Fix remaining NodeDB review issues

Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/c76b9a5a-7244-4fbc-9ef0-98091d8caaea

Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-09 12:45:51 +00:00
committed by GitHub
co-authored by thebentern
parent 589634c18d
commit a0daaf6b5c
16 changed files with 158 additions and 175 deletions
+6 -6
View File
@@ -742,12 +742,12 @@ void handleNodes(HTTPRequest *req, HTTPResponse *res)
node["position"] = new JSONValue();
if (nodeDB->hasValidPosition(tempNodeInfo)) {
const meshtastic_PositionLite *posLite = nodeDB->getNodePosition(tempNodeInfo->num);
if (posLite) {
meshtastic_PositionLite posLite;
if (nodeDB->copyNodePosition(tempNodeInfo->num, posLite)) {
JSONObject position;
position["latitude"] = new JSONValue((float)posLite->latitude_i * 1e-7);
position["longitude"] = new JSONValue((float)posLite->longitude_i * 1e-7);
position["altitude"] = new JSONValue((int)posLite->altitude);
position["latitude"] = new JSONValue((float)posLite.latitude_i * 1e-7);
position["longitude"] = new JSONValue((float)posLite.longitude_i * 1e-7);
position["altitude"] = new JSONValue((int)posLite.altitude);
node["position"] = new JSONValue(position);
}
}
@@ -930,4 +930,4 @@ void handleScanNetworks(HTTPRequest *req, HTTPResponse *res)
res->print(jsonString.c_str());
delete value;
}
#endif
#endif