From b59368ca3c7104d2fe4e5bd59aa35e01e9fcbf2b Mon Sep 17 00:00:00 2001 From: amerinoj <60507916+amerinoj@users.noreply.github.com> Date: Tue, 12 Apr 2022 14:13:25 +0200 Subject: [PATCH 1/3] Updated pinut in variant tlorav2_1_16 (#1365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added the last mac address bytes in bluetooth device name ESP32Bluetooth.cpp Add default notification pinout to tlora_v2_1_16/variant.h * updated ADC_MULTIPLIER value for more accuracy * Update variant.h Updated LORA_RESET GPIO in this board is 23 Removed LORA_DIO1 35 , gpio 35 is a battery pin Removed LORA_DIO2 34, gpio 34 is unuse in this board Co-authored-by: Ben Meadors Co-authored-by: Thomas Göttgens --- variants/tlora_v2_1_16/variant.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/variants/tlora_v2_1_16/variant.h b/variants/tlora_v2_1_16/variant.h index 958127b76..16d02e150 100644 --- a/variants/tlora_v2_1_16/variant.h +++ b/variants/tlora_v2_1_16/variant.h @@ -22,7 +22,5 @@ #define USE_RF95 #define LORA_DIO0 26 // a No connect on the SX1262 module -#define LORA_RESET 14 -#define LORA_DIO1 35 // Not really used -#define LORA_DIO2 34 // Not really used +#define LORA_RESET 23 From 794167c701ca7853d769c0ff1f65fb84454f4443 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 12 Apr 2022 13:04:24 +0000 Subject: [PATCH 2/3] Removed phone sds timeout (#1372) --- proto | 2 +- src/PowerFSM.cpp | 3 --- src/mesh/NodeDB.h | 2 -- src/mesh/generated/admin.pb.h | 2 +- src/mesh/generated/radioconfig.pb.h | 11 ++++------- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/proto b/proto index c6abcf8d6..6ff115232 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit c6abcf8d6b9c9dec630381c50198bed92258d4e8 +Subproject commit 6ff115232f052c01f479cc8288beb67fcde83504 diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index 0106cff47..a6fd758ac 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -363,9 +363,6 @@ void PowerFSM_setup() if (meshSds != UINT32_MAX) powerFSM.add_timed_transition(lowPowerState, &stateSDS, meshSds * 1000, NULL, "mesh timeout"); - // removing for now, because some users don't even have phones - // powerFSM.add_timed_transition(lowPowerState, &stateSDS, getPref_phone_sds_timeout_sec() * 1000, NULL, "phone - // timeout"); powerFSM.run_machine(); // run one interation of the state machine, so we run our on enter tasks for the initial DARK state } diff --git a/src/mesh/NodeDB.h b/src/mesh/NodeDB.h index c9a3a46bc..4cea56068 100644 --- a/src/mesh/NodeDB.h +++ b/src/mesh/NodeDB.h @@ -141,7 +141,6 @@ extern NodeDB nodeDB; # prefs.position_broadcast_secs = FIXME possibly broadcast only once an hr prefs.wait_bluetooth_secs = 1 # Don't stay in bluetooth mode prefs.mesh_sds_timeout_secs = never - prefs.phone_sds_timeout_sec = never # try to stay in light sleep one full day, then briefly wake and sleep again prefs.ls_secs = oneday @@ -176,7 +175,6 @@ PREF_GET(wait_bluetooth_secs, IF_ROUTER(1, 60)) PREF_GET(screen_on_secs, 60) PREF_GET(mesh_sds_timeout_secs, IF_ROUTER(NODE_DELAY_FOREVER, 2 * 60 * 60)) -PREF_GET(phone_sds_timeout_sec, IF_ROUTER(NODE_DELAY_FOREVER, 2 * 60 * 60)) PREF_GET(sds_secs, 365 * 24 * 60 * 60) // We default to sleeping (with bluetooth off for 5 minutes at a time). This seems to be a good tradeoff between diff --git a/src/mesh/generated/admin.pb.h b/src/mesh/generated/admin.pb.h index ef9db43cb..bd33f7b90 100644 --- a/src/mesh/generated/admin.pb.h +++ b/src/mesh/generated/admin.pb.h @@ -129,7 +129,7 @@ extern const pb_msgdesc_t AdminMessage_msg; #define AdminMessage_fields &AdminMessage_msg /* Maximum encoded size of messages (where known) */ -#define AdminMessage_size 604 +#define AdminMessage_size 598 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/radioconfig.pb.h b/src/mesh/generated/radioconfig.pb.h index 7a764e6fc..db1a82837 100644 --- a/src/mesh/generated/radioconfig.pb.h +++ b/src/mesh/generated/radioconfig.pb.h @@ -263,7 +263,6 @@ typedef struct _RadioConfig_UserPreferences { uint32_t wait_bluetooth_secs; uint32_t screen_on_secs; uint32_t phone_timeout_secs; - uint32_t phone_sds_timeout_sec; uint32_t mesh_sds_timeout_secs; uint32_t sds_secs; uint32_t ls_secs; @@ -400,16 +399,15 @@ extern "C" { /* Initializer values for message structs */ #define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default} -#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN, 0} +#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN, 0} #define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero} -#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN, 0} +#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, 0, _Role_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, _GpsCoordinateFormat_MIN, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_Serial_Mode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_TelemetrySensorType_MIN, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, 0, 0, 0, 0, _InputEventChar_MIN, _InputEventChar_MIN, _InputEventChar_MIN, 0, 0, "", 0, 0, 0, _RadioConfig_UserPreferences_Serial_Baud_MIN, 0} /* Field tags (for use in manual encoding/decoding) */ #define RadioConfig_UserPreferences_position_broadcast_secs_tag 1 #define RadioConfig_UserPreferences_wait_bluetooth_secs_tag 4 #define RadioConfig_UserPreferences_screen_on_secs_tag 5 #define RadioConfig_UserPreferences_phone_timeout_secs_tag 6 -#define RadioConfig_UserPreferences_phone_sds_timeout_sec_tag 7 #define RadioConfig_UserPreferences_mesh_sds_timeout_secs_tag 8 #define RadioConfig_UserPreferences_sds_secs_tag 9 #define RadioConfig_UserPreferences_ls_secs_tag 10 @@ -503,7 +501,6 @@ X(a, STATIC, SINGULAR, UINT32, position_broadcast_secs, 1) \ X(a, STATIC, SINGULAR, UINT32, wait_bluetooth_secs, 4) \ X(a, STATIC, SINGULAR, UINT32, screen_on_secs, 5) \ X(a, STATIC, SINGULAR, UINT32, phone_timeout_secs, 6) \ -X(a, STATIC, SINGULAR, UINT32, phone_sds_timeout_sec, 7) \ X(a, STATIC, SINGULAR, UINT32, mesh_sds_timeout_secs, 8) \ X(a, STATIC, SINGULAR, UINT32, sds_secs, 9) \ X(a, STATIC, SINGULAR, UINT32, ls_secs, 10) \ @@ -594,8 +591,8 @@ extern const pb_msgdesc_t RadioConfig_UserPreferences_msg; #define RadioConfig_UserPreferences_fields &RadioConfig_UserPreferences_msg /* Maximum encoded size of messages (where known) */ -#define RadioConfig_UserPreferences_size 598 -#define RadioConfig_size 601 +#define RadioConfig_UserPreferences_size 592 +#define RadioConfig_size 595 #ifdef __cplusplus } /* extern "C" */ From 0e4699d8b67c74b07e737bf050d41fd018ca64c8 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Tue, 12 Apr 2022 21:13:35 -0700 Subject: [PATCH 3/3] updating proto submodule to latest --- proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto b/proto index 6ff115232..870a62b27 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 6ff115232f052c01f479cc8288beb67fcde83504 +Subproject commit 870a62b27e6d28dd1427e14996aed22cffd8dd01