From 5f3f62ed468ffc3a62d1ec03c445ea080abdbd67 Mon Sep 17 00:00:00 2001 From: Niko <38405119+Eninspace@users.noreply.github.com> Date: Wed, 24 Feb 2021 13:45:21 +0300 Subject: [PATCH 1/2] Update README.md Added Russian community group link --- docs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/README.md b/docs/README.md index 982bb4f67..e268de0d7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,6 +42,7 @@ For an detailed walk-through aimed at beginners, we recommend [meshtastic.letsta ### Related Groups Telegram group for **Italy**-based users [t.me/meshtastic_italia](http://t.me/meshtastic_italia) (Italian language, unofficial). +Telegram group for **Russian**-based users [t.me/meshtastic_russia](https://t.me/meshtastic_russia) (Russian language, unofficial). # Updates From b2c47a7deac2a63df71d0feb906c6a6a387ab26d Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 25 Feb 2021 08:50:46 +0800 Subject: [PATCH 2/2] fix #710. nodes disappearing from map. thanks @DylanHoen for noticing! --- src/mesh/NodeDB.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index b8f0b5697..5680b6870 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -7,7 +7,6 @@ #include "CryptoEngine.h" #include "FSCommon.h" #include "GPS.h" -#include "main.h" #include "MeshRadio.h" #include "NodeDB.h" #include "PacketHistory.h" @@ -16,6 +15,7 @@ #include "Router.h" #include "configuration.h" #include "error.h" +#include "main.h" #include "mesh-pb-constants.h" #include #include @@ -183,7 +183,7 @@ bool NodeDB::resetRadioConfig() memset(activePSK, 0, sizeof(activePSK)); // In case the user provided a short key, we want to pad the rest with zeros memcpy(activePSK, channelSettings.psk.bytes, channelSettings.psk.size); activePSKSize = channelSettings.psk.size; - if(activePSKSize == 0) + if (activePSKSize == 0) DEBUG_MSG("Warning: User disabled encryption\n"); else if (activePSKSize == 1) { // Convert the short single byte variants of psk into variant that can be used more generally @@ -199,12 +199,12 @@ bool NodeDB::resetRadioConfig() uint8_t *last = activePSK + sizeof(defaultpsk) - 1; *last = *last + pskIndex - 1; // index of 1 means no change vs defaultPSK } - } else if(activePSKSize < 16) { + } else if (activePSKSize < 16) { // Error! The user specified only the first few bits of an AES128 key. So by convention we just pad the rest of the key // with zeros DEBUG_MSG("Warning: User provided a too short AES128 key - padding\n"); activePSKSize = 16; - } else if(activePSKSize < 32 && activePSKSize != 16) { + } else if (activePSKSize < 32 && activePSKSize != 16) { // Error! The user specified only the first few bits of an AES256 key. So by convention we just pad the rest of the key // with zeros DEBUG_MSG("Warning: User provided a too short AES256 key - padding\n"); @@ -489,7 +489,15 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p) DEBUG_MSG("DB update position node=0x%x time=%u, latI=%d, lonI=%d\n", nodeId, p.time, p.latitude_i, p.longitude_i); - info->position = p; + // Be careful to only update fields that have been set by the sender + if (p.time) + info->position.time = p.time; + if(p.battery_level) + info->position.battery_level = p.battery_level; + if (p.latitude_i || p.longitude_i) { + info->position.latitude_i = p.latitude_i; + info->position.longitude_i = p.longitude_i; + } info->has_position = true; updateGUIforNode = info; notifyObservers(true); // Force an update whether or not our node counts have changed @@ -601,10 +609,9 @@ void recordCriticalError(CriticalErrorCode code, uint32_t address) String lcd = String("Critical error ") + code + "!\n"; screen->print(lcd.c_str()); DEBUG_MSG("NOTE! Recording critical error %d, address=%lx\n", code, address); - + // Record error to DB myNodeInfo.error_code = code; myNodeInfo.error_address = address; myNodeInfo.error_count++; - }