From 992bbe76d7d8ea9439fa593f65640e73e6fa529f Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Sat, 23 Oct 2021 01:12:53 +0000 Subject: [PATCH] add backward compatible position flag defaults (#884) --- src/mesh/NodeDB.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index a2639cf67..d4bbf59b9 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -125,6 +125,11 @@ void NodeDB::installDefaultRadioConfig() memset(&radioConfig, 0, sizeof(radioConfig)); radioConfig.has_preferences = true; resetRadioConfig(); + + // for backward compat, default position flags are BAT+ALT+MSL (0x23 = 35) + radioConfig.preferences.position_flags = (PositionFlags_POS_BATTERY | + PositionFlags_POS_ALTITUDE | PositionFlags_POS_ALT_MSL); + } void NodeDB::installDefaultChannels()