More comprehensively clear current position info (#2881)

This commit is contained in:
Ben Meadors 2023-10-10 19:33:58 -05:00 committed by GitHub
parent 9d1fe8c245
commit e39f129bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,9 @@ void PositionModule::clearPosition()
meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(nodeDB.getNodeNum());
node->position.latitude_i = 0;
node->position.longitude_i = 0;
node->position.altitude = 0;
node->position.time = 0;
nodeDB.setLocalPosition(meshtastic_Position_init_default);
}
bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Position *pptr)