mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 15:52:34 +00:00
Only allow phone to set time for fixed positions (#3403)
This commit is contained in:
@@ -59,9 +59,15 @@ bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
|
||||
// to set fixed location, EUD-GPS location or just the time (see also issue #900)
|
||||
bool isLocal = false;
|
||||
if (nodeDB.getNodeNum() == getFrom(&mp)) {
|
||||
LOG_DEBUG("Incoming update from MYSELF\n");
|
||||
isLocal = true;
|
||||
nodeDB.setLocalPosition(p);
|
||||
if (config.position.fixed_position) {
|
||||
LOG_DEBUG("Ignore incoming position update from myself except for time, because position.fixed_position is true\n");
|
||||
nodeDB.setLocalPosition(p, true);
|
||||
return false;
|
||||
} else {
|
||||
LOG_DEBUG("Incoming update from MYSELF\n");
|
||||
nodeDB.setLocalPosition(p);
|
||||
}
|
||||
}
|
||||
|
||||
// Log packet size and data fields
|
||||
|
||||
Reference in New Issue
Block a user