From 4f10ab8d040f48bd602c2b799274e75d4fbc75f6 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Wed, 1 Dec 2021 17:24:01 -0800 Subject: [PATCH 1/9] Little update to #934 updated lastGpsSend --- src/plugins/PositionPlugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/PositionPlugin.cpp b/src/plugins/PositionPlugin.cpp index 11d13aba..f0aabdf2 100644 --- a/src/plugins/PositionPlugin.cpp +++ b/src/plugins/PositionPlugin.cpp @@ -170,6 +170,11 @@ int32_t PositionPlugin::runOnce() DEBUG_MSG("Sending smart pos@%x:6 to mesh (wantReplies=%d)\n", node->position.pos_timestamp, requestReplies); sendOurPosition(NODENUM_BROADCAST, requestReplies); + + /* Update lastGpsSend to now. This means if the device is stationary, then + getPref_position_broadcast_secs will still apply. + */ + lastGpsSend = now; } } } From f4d348173c2fd83759d4dc9b4473944e4350d645 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Wed, 1 Dec 2021 17:56:47 -0800 Subject: [PATCH 2/9] Refresh node info to ensure our information is current for smart position. #934 --- src/plugins/PositionPlugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/PositionPlugin.cpp b/src/plugins/PositionPlugin.cpp index f0aabdf2..2a6ccbd9 100644 --- a/src/plugins/PositionPlugin.cpp +++ b/src/plugins/PositionPlugin.cpp @@ -145,7 +145,7 @@ int32_t PositionPlugin::runOnce() DEBUG_MSG("Sending pos@%x:6 to mesh (wantReplies=%d)\n", node->position.pos_timestamp, requestReplies); sendOurPosition(NODENUM_BROADCAST, requestReplies); } else if (radioConfig.preferences.position_broadcast_smart == true) { - // NodeInfo *node = service.refreshMyNodeInfo(); // should guarantee there is now a position + NodeInfo *node = service.refreshMyNodeInfo(); // should guarantee there is now a position if (node->has_position && (node->position.latitude_i != 0 || node->position.longitude_i != 0)) { float distance = GeoCoord::latLongToMeter(lastGpsLatitude * 1e-7, lastGpsLongitude * 1e-7, From 9d019c1a99bb539cef3db3774f2023fbc220daf3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 2 Dec 2021 10:19:25 -0600 Subject: [PATCH 3/9] Adding batch script for generating uf2 files for NRF boards (#945) * Updated generated protos * Added uf2-converter batch for windows machines --- bin/uf2-convert.bat | 2 ++ src/mesh/generated/admin.pb.h | 2 +- src/mesh/generated/deviceonly.pb.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 bin/uf2-convert.bat diff --git a/bin/uf2-convert.bat b/bin/uf2-convert.bat new file mode 100644 index 00000000..242bec3a --- /dev/null +++ b/bin/uf2-convert.bat @@ -0,0 +1,2 @@ +@echo off +if [%1]==[] (echo "Please specify a platformio NRF target (i.e. rak4631) as the first argument.") else (python3 .\bin\uf2conv.py .\.pio\build\%1\firmware.hex -c -o .\.pio\build\%1\firmware.uf2 -f 0xADA52840) \ No newline at end of file diff --git a/src/mesh/generated/admin.pb.h b/src/mesh/generated/admin.pb.h index ab415243..e27ee193 100644 --- a/src/mesh/generated/admin.pb.h +++ b/src/mesh/generated/admin.pb.h @@ -4,9 +4,9 @@ #ifndef PB_ADMIN_PB_H_INCLUDED #define PB_ADMIN_PB_H_INCLUDED #include +#include "channel.pb.h" #include "mesh.pb.h" #include "radioconfig.pb.h" -#include "channel.pb.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. diff --git a/src/mesh/generated/deviceonly.pb.h b/src/mesh/generated/deviceonly.pb.h index 591c3cc2..129e0b81 100644 --- a/src/mesh/generated/deviceonly.pb.h +++ b/src/mesh/generated/deviceonly.pb.h @@ -4,8 +4,8 @@ #ifndef PB_DEVICEONLY_PB_H_INCLUDED #define PB_DEVICEONLY_PB_H_INCLUDED #include -#include "mesh.pb.h" #include "channel.pb.h" +#include "mesh.pb.h" #include "radioconfig.pb.h" #if PB_PROTO_HEADER_VERSION != 40 From fcccddc4ad1a8d4cbf7d7b2b9b84e1be182edb6f Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 16:44:00 -0800 Subject: [PATCH 4/9] updating proto submodule to latest --- proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto b/proto index 0de53c84..3ba36ec5 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 0de53c84a26a42ce9405109e392ca1143de86f58 +Subproject commit 3ba36ec5db702ef0875128271ba20bf8558508a2 From 1175c981c02ecb4e9cbd4522707f063af4df0338 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 17:16:39 -0800 Subject: [PATCH 5/9] Update generated protos for S&F --- platformio.ini | 10 +- src/mesh/generated/storeforward.pb.c | 6 +- src/mesh/generated/storeforward.pb.h | 131 +++++++++++++-------------- 3 files changed, 73 insertions(+), 74 deletions(-) diff --git a/platformio.ini b/platformio.ini index 7a908ffd..42f64b91 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -;default_envs = tbeam +default_envs = tbeam ;default_envs = tbeam0.7 ;default_envs = heltec-v2.0 ;default_envs = tlora-v1 @@ -21,7 +21,7 @@ ;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here ;default_envs = rak4631 ;default_envs = rak4630 -default_envs = meshtastic-diy-v1 +;default_envs = meshtastic-diy-v1 [common] ; common is not currently used @@ -120,11 +120,11 @@ platform_packages = framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#4cde0f5d412d2695184f32e8a47e9bea57b45276 ; leave this commented out to avoid breaking Windows -upload_port = /dev/ttyUSB0 +;upload_port = /dev/ttyUSB0 ;monitor_port = /dev/ttyUSB0 -;upload_port = /dev/cu.SLAB_USBtoUART -;monitor_port = /dev/cu.SLAB_USBtoUART +upload_port = /dev/cu.SLAB_USBtoUART +monitor_port = /dev/cu.SLAB_USBtoUART ; customize the partition table ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables diff --git a/src/mesh/generated/storeforward.pb.c b/src/mesh/generated/storeforward.pb.c index a348ee01..5cca6d04 100644 --- a/src/mesh/generated/storeforward.pb.c +++ b/src/mesh/generated/storeforward.pb.c @@ -6,13 +6,13 @@ #error Regenerate this file with the current version of nanopb generator. #endif -PB_BIND(StoreAndForwardMessage, StoreAndForwardMessage, AUTO) +PB_BIND(StoreAndForward, StoreAndForward, AUTO) -PB_BIND(StoreAndForwardMessage_Statistics, StoreAndForwardMessage_Statistics, AUTO) +PB_BIND(StoreAndForward_Statistics, StoreAndForward_Statistics, AUTO) -PB_BIND(StoreAndForwardMessage_History, StoreAndForwardMessage_History, AUTO) +PB_BIND(StoreAndForward_History, StoreAndForward_History, AUTO) diff --git a/src/mesh/generated/storeforward.pb.h b/src/mesh/generated/storeforward.pb.h index 988ff327..76ca4187 100644 --- a/src/mesh/generated/storeforward.pb.h +++ b/src/mesh/generated/storeforward.pb.h @@ -10,28 +10,27 @@ #endif /* Enum definitions */ -typedef enum _StoreAndForwardMessage_RequestResponse { - StoreAndForwardMessage_RequestResponse_UNSET = 0, - StoreAndForwardMessage_RequestResponse_ROUTER_ERROR = 1, - StoreAndForwardMessage_RequestResponse_ROUTER_HEARTBEAT = 2, - StoreAndForwardMessage_RequestResponse_ROUTER_PING = 3, - StoreAndForwardMessage_RequestResponse_ROUTER_PONG = 4, - StoreAndForwardMessage_RequestResponse_ROUTER_BUSY = 5, - StoreAndForwardMessage_RequestResponse_CLIENT_ERROR = 101, - StoreAndForwardMessage_RequestResponse_CLIENT_HISTORY = 102, - StoreAndForwardMessage_RequestResponse_CLIENT_STATS = 103, - StoreAndForwardMessage_RequestResponse_CLIENT_PING = 104, - StoreAndForwardMessage_RequestResponse_CLIENT_PONG = 105, - StoreAndForwardMessage_RequestResponse_MAX = 255 -} StoreAndForwardMessage_RequestResponse; +typedef enum _StoreAndForward_RequestResponse { + StoreAndForward_RequestResponse_UNSET = 0, + StoreAndForward_RequestResponse_ROUTER_ERROR = 1, + StoreAndForward_RequestResponse_ROUTER_HEARTBEAT = 2, + StoreAndForward_RequestResponse_ROUTER_PING = 3, + StoreAndForward_RequestResponse_ROUTER_PONG = 4, + StoreAndForward_RequestResponse_ROUTER_BUSY = 5, + StoreAndForward_RequestResponse_CLIENT_ERROR = 101, + StoreAndForward_RequestResponse_CLIENT_HISTORY = 102, + StoreAndForward_RequestResponse_CLIENT_STATS = 103, + StoreAndForward_RequestResponse_CLIENT_PING = 104, + StoreAndForward_RequestResponse_CLIENT_PONG = 105 +} StoreAndForward_RequestResponse; /* Struct definitions */ -typedef struct _StoreAndForwardMessage_History { +typedef struct _StoreAndForward_History { uint32_t HistoryMessages; uint32_t Window; -} StoreAndForwardMessage_History; +} StoreAndForward_History; -typedef struct _StoreAndForwardMessage_Statistics { +typedef struct _StoreAndForward_Statistics { uint32_t MessagesTotal; uint32_t MessagesSaved; uint32_t MessagesMax; @@ -41,21 +40,21 @@ typedef struct _StoreAndForwardMessage_Statistics { bool Heartbeat; uint32_t ReturnMax; uint32_t ReturnWindow; -} StoreAndForwardMessage_Statistics; +} StoreAndForward_Statistics; -typedef struct _StoreAndForwardMessage { - StoreAndForwardMessage_RequestResponse rr; +typedef struct _StoreAndForward { + StoreAndForward_RequestResponse rr; bool has_stats; - StoreAndForwardMessage_Statistics stats; + StoreAndForward_Statistics stats; bool has_history; - StoreAndForwardMessage_History history; -} StoreAndForwardMessage; + StoreAndForward_History history; +} StoreAndForward; /* Helper constants for enums */ -#define _StoreAndForwardMessage_RequestResponse_MIN StoreAndForwardMessage_RequestResponse_UNSET -#define _StoreAndForwardMessage_RequestResponse_MAX StoreAndForwardMessage_RequestResponse_MAX -#define _StoreAndForwardMessage_RequestResponse_ARRAYSIZE ((StoreAndForwardMessage_RequestResponse)(StoreAndForwardMessage_RequestResponse_MAX+1)) +#define _StoreAndForward_RequestResponse_MIN StoreAndForward_RequestResponse_UNSET +#define _StoreAndForward_RequestResponse_MAX StoreAndForward_RequestResponse_CLIENT_PONG +#define _StoreAndForward_RequestResponse_ARRAYSIZE ((StoreAndForward_RequestResponse)(StoreAndForward_RequestResponse_CLIENT_PONG+1)) #ifdef __cplusplus @@ -63,40 +62,40 @@ extern "C" { #endif /* Initializer values for message structs */ -#define StoreAndForwardMessage_init_default {_StoreAndForwardMessage_RequestResponse_MIN, false, StoreAndForwardMessage_Statistics_init_default, false, StoreAndForwardMessage_History_init_default} -#define StoreAndForwardMessage_Statistics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0} -#define StoreAndForwardMessage_History_init_default {0, 0} -#define StoreAndForwardMessage_init_zero {_StoreAndForwardMessage_RequestResponse_MIN, false, StoreAndForwardMessage_Statistics_init_zero, false, StoreAndForwardMessage_History_init_zero} -#define StoreAndForwardMessage_Statistics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0} -#define StoreAndForwardMessage_History_init_zero {0, 0} +#define StoreAndForward_init_default {_StoreAndForward_RequestResponse_MIN, false, StoreAndForward_Statistics_init_default, false, StoreAndForward_History_init_default} +#define StoreAndForward_Statistics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0} +#define StoreAndForward_History_init_default {0, 0} +#define StoreAndForward_init_zero {_StoreAndForward_RequestResponse_MIN, false, StoreAndForward_Statistics_init_zero, false, StoreAndForward_History_init_zero} +#define StoreAndForward_Statistics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0} +#define StoreAndForward_History_init_zero {0, 0} /* Field tags (for use in manual encoding/decoding) */ -#define StoreAndForwardMessage_History_HistoryMessages_tag 1 -#define StoreAndForwardMessage_History_Window_tag 2 -#define StoreAndForwardMessage_Statistics_MessagesTotal_tag 1 -#define StoreAndForwardMessage_Statistics_MessagesSaved_tag 2 -#define StoreAndForwardMessage_Statistics_MessagesMax_tag 3 -#define StoreAndForwardMessage_Statistics_UpTime_tag 4 -#define StoreAndForwardMessage_Statistics_Requests_tag 5 -#define StoreAndForwardMessage_Statistics_RequestsHistory_tag 6 -#define StoreAndForwardMessage_Statistics_Heartbeat_tag 7 -#define StoreAndForwardMessage_Statistics_ReturnMax_tag 8 -#define StoreAndForwardMessage_Statistics_ReturnWindow_tag 9 -#define StoreAndForwardMessage_rr_tag 1 -#define StoreAndForwardMessage_stats_tag 2 -#define StoreAndForwardMessage_history_tag 3 +#define StoreAndForward_History_HistoryMessages_tag 1 +#define StoreAndForward_History_Window_tag 2 +#define StoreAndForward_Statistics_MessagesTotal_tag 1 +#define StoreAndForward_Statistics_MessagesSaved_tag 2 +#define StoreAndForward_Statistics_MessagesMax_tag 3 +#define StoreAndForward_Statistics_UpTime_tag 4 +#define StoreAndForward_Statistics_Requests_tag 5 +#define StoreAndForward_Statistics_RequestsHistory_tag 6 +#define StoreAndForward_Statistics_Heartbeat_tag 7 +#define StoreAndForward_Statistics_ReturnMax_tag 8 +#define StoreAndForward_Statistics_ReturnWindow_tag 9 +#define StoreAndForward_rr_tag 1 +#define StoreAndForward_stats_tag 2 +#define StoreAndForward_history_tag 3 /* Struct field encoding specification for nanopb */ -#define StoreAndForwardMessage_FIELDLIST(X, a) \ +#define StoreAndForward_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UENUM, rr, 1) \ X(a, STATIC, OPTIONAL, MESSAGE, stats, 2) \ X(a, STATIC, OPTIONAL, MESSAGE, history, 3) -#define StoreAndForwardMessage_CALLBACK NULL -#define StoreAndForwardMessage_DEFAULT NULL -#define StoreAndForwardMessage_stats_MSGTYPE StoreAndForwardMessage_Statistics -#define StoreAndForwardMessage_history_MSGTYPE StoreAndForwardMessage_History +#define StoreAndForward_CALLBACK NULL +#define StoreAndForward_DEFAULT NULL +#define StoreAndForward_stats_MSGTYPE StoreAndForward_Statistics +#define StoreAndForward_history_MSGTYPE StoreAndForward_History -#define StoreAndForwardMessage_Statistics_FIELDLIST(X, a) \ +#define StoreAndForward_Statistics_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UINT32, MessagesTotal, 1) \ X(a, STATIC, SINGULAR, UINT32, MessagesSaved, 2) \ X(a, STATIC, SINGULAR, UINT32, MessagesMax, 3) \ @@ -106,28 +105,28 @@ X(a, STATIC, SINGULAR, UINT32, RequestsHistory, 6) \ X(a, STATIC, SINGULAR, BOOL, Heartbeat, 7) \ X(a, STATIC, SINGULAR, UINT32, ReturnMax, 8) \ X(a, STATIC, SINGULAR, UINT32, ReturnWindow, 9) -#define StoreAndForwardMessage_Statistics_CALLBACK NULL -#define StoreAndForwardMessage_Statistics_DEFAULT NULL +#define StoreAndForward_Statistics_CALLBACK NULL +#define StoreAndForward_Statistics_DEFAULT NULL -#define StoreAndForwardMessage_History_FIELDLIST(X, a) \ +#define StoreAndForward_History_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UINT32, HistoryMessages, 1) \ X(a, STATIC, SINGULAR, UINT32, Window, 2) -#define StoreAndForwardMessage_History_CALLBACK NULL -#define StoreAndForwardMessage_History_DEFAULT NULL +#define StoreAndForward_History_CALLBACK NULL +#define StoreAndForward_History_DEFAULT NULL -extern const pb_msgdesc_t StoreAndForwardMessage_msg; -extern const pb_msgdesc_t StoreAndForwardMessage_Statistics_msg; -extern const pb_msgdesc_t StoreAndForwardMessage_History_msg; +extern const pb_msgdesc_t StoreAndForward_msg; +extern const pb_msgdesc_t StoreAndForward_Statistics_msg; +extern const pb_msgdesc_t StoreAndForward_History_msg; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ -#define StoreAndForwardMessage_fields &StoreAndForwardMessage_msg -#define StoreAndForwardMessage_Statistics_fields &StoreAndForwardMessage_Statistics_msg -#define StoreAndForwardMessage_History_fields &StoreAndForwardMessage_History_msg +#define StoreAndForward_fields &StoreAndForward_msg +#define StoreAndForward_Statistics_fields &StoreAndForward_Statistics_msg +#define StoreAndForward_History_fields &StoreAndForward_History_msg /* Maximum encoded size of messages (where known) */ -#define StoreAndForwardMessage_size 69 -#define StoreAndForwardMessage_Statistics_size 50 -#define StoreAndForwardMessage_History_size 12 +#define StoreAndForward_size 68 +#define StoreAndForward_Statistics_size 50 +#define StoreAndForward_History_size 12 #ifdef __cplusplus } /* extern "C" */ From f1ef1eeaff80eed76abe5c96373096c06dae36d5 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 17:19:21 -0800 Subject: [PATCH 6/9] Add monitor & upload for mac (commented out) --- platformio.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platformio.ini b/platformio.ini index 42f64b91..4669234f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = tbeam +;default_envs = tbeam ;default_envs = tbeam0.7 ;default_envs = heltec-v2.0 ;default_envs = tlora-v1 @@ -120,11 +120,11 @@ platform_packages = framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#4cde0f5d412d2695184f32e8a47e9bea57b45276 ; leave this commented out to avoid breaking Windows -;upload_port = /dev/ttyUSB0 +upload_port = /dev/ttyUSB0 ;monitor_port = /dev/ttyUSB0 -upload_port = /dev/cu.SLAB_USBtoUART -monitor_port = /dev/cu.SLAB_USBtoUART +;upload_port = /dev/cu.SLAB_USBtoUART +;monitor_port = /dev/cu.SLAB_USBtoUART ; customize the partition table ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables From 0ca061a457a6ada5681dfd742866dcb4057e87f1 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 17:20:04 -0800 Subject: [PATCH 7/9] uncomment meshtastic-diy-v1 --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 4669234f..7a908ffd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,7 +21,7 @@ ;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here ;default_envs = rak4631 ;default_envs = rak4630 -;default_envs = meshtastic-diy-v1 +default_envs = meshtastic-diy-v1 [common] ; common is not currently used From 6a426d5d71da272160c679e459698c3fa39bba21 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 17:27:38 -0800 Subject: [PATCH 8/9] Update S&F with new object name --- src/plugins/esp32/StoreForwardPlugin.cpp | 69 +++++++++++++++++++++--- src/plugins/esp32/StoreForwardPlugin.h | 2 + 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/src/plugins/esp32/StoreForwardPlugin.cpp b/src/plugins/esp32/StoreForwardPlugin.cpp index 3b2372cc..06080cdb 100644 --- a/src/plugins/esp32/StoreForwardPlugin.cpp +++ b/src/plugins/esp32/StoreForwardPlugin.cpp @@ -229,11 +229,12 @@ ProcessMessage StoreForwardPlugin::handleReceived(const MeshPacket &mp) DEBUG_MSG("--- S&F Received something\n"); + /* StoreAndForwardMessage sfm = StoreAndForwardMessage_init_default; switch (sfm.rr) { } - +*/ auto &p = mp.decoded; // The router node should not be sending messages as a client. @@ -279,6 +280,66 @@ ProcessMessage StoreForwardPlugin::handleReceived(const MeshPacket &mp) return ProcessMessage::CONTINUE; // Let others look at this message also if they want } +ProcessMessage StoreForwardPlugin::handleReceivedProtobuf(const MeshPacket &mp, StoreAndForward *p) +{ + if (!radioConfig.preferences.store_forward_plugin_enabled) { + // If this plugin is not enabled in any capacity, don't handle the packet, and allow other plugins to consume + return ProcessMessage::CONTINUE; + } + + //auto sfp = *p; + //auto p = *p; + + // Advance states as needed + switch (p->rr) { + case StoreAndForward_RequestResponse_CLIENT_ERROR: + // Do nothing + break; + + case StoreAndForward_RequestResponse_CLIENT_HISTORY: + // Do nothing + break; + + case StoreAndForward_RequestResponse_CLIENT_PING: + // Do nothing + break; + + case StoreAndForward_RequestResponse_CLIENT_PONG: + // Do nothing + break; + + case StoreAndForward_RequestResponse_CLIENT_STATS: + // Do nothing + break; + + case StoreAndForward_RequestResponse_ROUTER_BUSY: + // Do nothing + break; + + case StoreAndForward_RequestResponse_ROUTER_ERROR: + // Do nothing + break; + + case StoreAndForward_RequestResponse_ROUTER_HEARTBEAT: + // Do nothing + break; + + case StoreAndForward_RequestResponse_ROUTER_PING: + // Do nothing + break; + + case StoreAndForward_RequestResponse_ROUTER_PONG: + // Do nothing + break; + + + default: + assert(0); // unexpected state - FIXME, make an error code and reboot + } + + return ProcessMessage::CONTINUE; // Let others look at this message also if they want +} + StoreForwardPlugin::StoreForwardPlugin() : SinglePortPlugin("StoreForwardPlugin", PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("StoreForwardPlugin") { @@ -311,12 +372,6 @@ StoreForwardPlugin::StoreForwardPlugin() // Popupate PSRAM with our data structures. this->populatePSRAM(); - // Calculate the packet time. - // this->packetTimeMax = RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN); - // RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN); - // RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN); - // RadioInterface::getPacketTime(500)l - this->packetTimeMax = 2000; } else { diff --git a/src/plugins/esp32/StoreForwardPlugin.h b/src/plugins/esp32/StoreForwardPlugin.h index cd8daed7..05526e78 100644 --- a/src/plugins/esp32/StoreForwardPlugin.h +++ b/src/plugins/esp32/StoreForwardPlugin.h @@ -71,6 +71,8 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea it */ virtual ProcessMessage handleReceived(const MeshPacket &mp); + virtual ProcessMessage handleReceivedProtobuf(const MeshPacket &mp, StoreAndForward *p); + }; extern StoreForwardPlugin *storeForwardPlugin; \ No newline at end of file From f09aa9bec094a1fc8473b6f30e9c00bc4f7f9d5c Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 2 Dec 2021 19:40:40 -0800 Subject: [PATCH 9/9] Fix promote-release #947 Fix promote-release #947 --- bin/promote-release.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/promote-release.sh b/bin/promote-release.sh index b4828dd6..e79a06aa 100755 --- a/bin/promote-release.sh +++ b/bin/promote-release.sh @@ -6,6 +6,10 @@ VERSION=`bin/buildinfo.py long` # Must have a V prefix to trigger github git tag "v${VERSION}" -git push root "v${VERSION}" # push the tag + +# Commented out per https://github.com/meshtastic/Meshtastic-device/issues/947 +#git push root "v${VERSION}" # push the tag + +git push origin "v${VERSION}" # push the tag echo "Tag ${VERSION} pushed to github, github actions should now be building the draft release. If it seems good, click to publish it"