mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-21 12:38:34 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
3371ff17a5
@ -133,8 +133,13 @@ class NodeDB
|
|||||||
meshtastic_NodeInfoLite *getMeshNode(NodeNum n);
|
meshtastic_NodeInfoLite *getMeshNode(NodeNum n);
|
||||||
size_t getNumMeshNodes() { return *numMeshNodes; }
|
size_t getNumMeshNodes() { return *numMeshNodes; }
|
||||||
|
|
||||||
void setLocalPosition(meshtastic_Position position)
|
void setLocalPosition(meshtastic_Position position, bool timeOnly = false)
|
||||||
{
|
{
|
||||||
|
if (timeOnly) {
|
||||||
|
LOG_DEBUG("Setting local position time only: time=%i\n", position.time);
|
||||||
|
localPosition.time = position.time;
|
||||||
|
return;
|
||||||
|
}
|
||||||
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i\n", position.latitude_i, position.longitude_i,
|
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i\n", position.latitude_i, position.longitude_i,
|
||||||
position.time);
|
position.time);
|
||||||
localPosition = position;
|
localPosition = position;
|
||||||
@ -248,4 +253,4 @@ extern uint32_t error_address;
|
|||||||
#define Module_Config_size \
|
#define Module_Config_size \
|
||||||
(ModuleConfig_CannedMessageConfig_size + ModuleConfig_ExternalNotificationConfig_size + ModuleConfig_MQTTConfig_size + \
|
(ModuleConfig_CannedMessageConfig_size + ModuleConfig_ExternalNotificationConfig_size + ModuleConfig_MQTTConfig_size + \
|
||||||
ModuleConfig_RangeTestConfig_size + ModuleConfig_SerialConfig_size + ModuleConfig_StoreForwardConfig_size + \
|
ModuleConfig_RangeTestConfig_size + ModuleConfig_SerialConfig_size + ModuleConfig_StoreForwardConfig_size + \
|
||||||
ModuleConfig_TelemetryConfig_size + ModuleConfig_size)
|
ModuleConfig_TelemetryConfig_size + ModuleConfig_size)
|
@ -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)
|
// to set fixed location, EUD-GPS location or just the time (see also issue #900)
|
||||||
bool isLocal = false;
|
bool isLocal = false;
|
||||||
if (nodeDB.getNodeNum() == getFrom(&mp)) {
|
if (nodeDB.getNodeNum() == getFrom(&mp)) {
|
||||||
LOG_DEBUG("Incoming update from MYSELF\n");
|
|
||||||
isLocal = true;
|
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
|
// Log packet size and data fields
|
||||||
|
@ -486,9 +486,9 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket &
|
|||||||
|
|
||||||
auto &ch = channels.getByIndex(chIndex);
|
auto &ch = channels.getByIndex(chIndex);
|
||||||
|
|
||||||
if (&mp.decoded && strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 &&
|
if (&mp_decoded.decoded && strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 &&
|
||||||
(mp.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP ||
|
(mp_decoded.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP ||
|
||||||
mp.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) {
|
mp_decoded.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) {
|
||||||
LOG_DEBUG("MQTT onSend - Ignoring range test or detection sensor message on public mqtt\n");
|
LOG_DEBUG("MQTT onSend - Ignoring range test or detection sensor message on public mqtt\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user