mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 05:31:25 +00:00
Respect loc_share_disabled
This commit is contained in:
parent
e5e25c2f31
commit
8adacba3a1
2
proto
2
proto
@ -1 +1 @@
|
||||
Subproject commit 6794a2f4aaca7540793fc3a73982152722656ba4
|
||||
Subproject commit 3e70448a0f31b2868dccbe13862df35bea939b74
|
@ -169,9 +169,10 @@ uint32_t GPS::getWakeTime() const
|
||||
uint32_t GPS::getSleepTime() const
|
||||
{
|
||||
uint32_t t = radioConfig.preferences.gps_update_interval;
|
||||
bool disabled = radioConfig.preferences.gps_disabled;
|
||||
bool gps_disabled = radioConfig.preferences.gps_disabled;
|
||||
bool loc_share_disabled = radioConfig.preferences.location_share_disabled;
|
||||
|
||||
if (disabled)
|
||||
if (gps_disabled || loc_share_disabled)
|
||||
t = UINT32_MAX; // Sleep forever now
|
||||
|
||||
if (t == UINT32_MAX)
|
||||
|
@ -115,7 +115,7 @@ typedef struct _RadioConfig_UserPreferences {
|
||||
ChargeCurrent charge_current;
|
||||
bool position_broadcast_smart_disabled;
|
||||
Role role;
|
||||
bool disable_location_share;
|
||||
bool location_share_disabled;
|
||||
bool gps_disabled;
|
||||
uint32_t gps_update_interval;
|
||||
uint32_t gps_attempt_time;
|
||||
@ -248,7 +248,7 @@ extern "C" {
|
||||
#define RadioConfig_UserPreferences_charge_current_tag 16
|
||||
#define RadioConfig_UserPreferences_position_broadcast_smart_disabled_tag 17
|
||||
#define RadioConfig_UserPreferences_role_tag 18
|
||||
#define RadioConfig_UserPreferences_disable_location_share_tag 32
|
||||
#define RadioConfig_UserPreferences_location_share_disabled_tag 32
|
||||
#define RadioConfig_UserPreferences_gps_disabled_tag 33
|
||||
#define RadioConfig_UserPreferences_gps_update_interval_tag 34
|
||||
#define RadioConfig_UserPreferences_gps_attempt_time_tag 36
|
||||
@ -341,7 +341,7 @@ X(a, STATIC, SINGULAR, UENUM, region, 15) \
|
||||
X(a, STATIC, SINGULAR, UENUM, charge_current, 16) \
|
||||
X(a, STATIC, SINGULAR, BOOL, position_broadcast_smart_disabled, 17) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 18) \
|
||||
X(a, STATIC, SINGULAR, BOOL, disable_location_share, 32) \
|
||||
X(a, STATIC, SINGULAR, BOOL, location_share_disabled, 32) \
|
||||
X(a, STATIC, SINGULAR, BOOL, gps_disabled, 33) \
|
||||
X(a, STATIC, SINGULAR, UINT32, gps_update_interval, 34) \
|
||||
X(a, STATIC, SINGULAR, UINT32, gps_attempt_time, 36) \
|
||||
|
Loading…
Reference in New Issue
Block a user