From 97d7a89644dc815fdc2a352843aa50403427df1b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 30 Jul 2023 07:58:11 -0500 Subject: [PATCH 1/7] Update protobufs --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/protobufs b/protobufs index 57bd75ea8..6f88374ec 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 57bd75ea8b3c4fe551dcaf1dcd402646878176a8 +Subproject commit 6f88374ec6939fabc3ef79771843c291db063fae diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 6007265d5..7fffe9ea7 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -59,6 +59,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_TLORA_T3_S3 = 16, /* B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer */ meshtastic_HardwareModel_NANO_G1_EXPLORER = 17, + /* B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra */ + meshtastic_HardwareModel_NANO_G2_ULTRA = 18, /* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */ meshtastic_HardwareModel_STATION_G1 = 25, /* RAK11310 (RP2040 + SX1262) */ @@ -228,9 +230,9 @@ typedef enum _meshtastic_Routing_Error { to make sure that critical packets are sent ASAP. In the case of meshtastic that means we want to send protocol acks as soon as possible (to prevent unneeded retransmissions), we want routing messages to be sent next, - then messages marked as reliable and finally ‘background’ packets like periodic position updates. + then messages marked as reliable and finally 'background' packets like periodic position updates. So I bit the bullet and implemented a new (internal - not sent over the air) - field in MeshPacket called ‘priority’. + field in MeshPacket called 'priority'. And the transmission queue in the router object is now a priority queue. */ typedef enum _meshtastic_MeshPacket_Priority { /* Treated as Priority.DEFAULT */ From 76dc80518489a1f4d11e8dd0c70a33bea9bf6859 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 30 Jul 2023 14:07:17 -0500 Subject: [PATCH 2/7] Add Nano-g2-ultra --- .github/workflows/main_matrix.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index b4a8a4739..09c0635a4 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -111,6 +111,7 @@ jobs: - board: t-echo - board: pca10059_diy_eink - board: feather_diy + - board: nano-g2-ultra uses: ./.github/workflows/build_nrf52.yml with: board: ${{ matrix.board }} From 8a49221b7fcb1388ecdc1cc5eb43305f5f875dec Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 30 Jul 2023 20:17:57 -0500 Subject: [PATCH 3/7] Update version.properties --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 00ddcfc79..c00681305 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 1 -build = 21 +build = 22 From ef5e21d3da5a06635180bc96a0ff655d62ff9ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 31 Jul 2023 21:37:55 +0200 Subject: [PATCH 4/7] Enable Trunk on Windows --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b489975b..03922dc72 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "trunk.io" + "editor.defaultFormatter": "trunk.io", + "trunk.enableWindows": true } From 5a5af4707c59203fa4ef8bf722e8c8af6d7f7a4f Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Mon, 31 Jul 2023 19:47:01 +0200 Subject: [PATCH 5/7] SerialModule SIMPLE mode: use `write()` instead of `printf()` --- src/modules/SerialModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index a3cac53b1..1caae69a3 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -249,7 +249,7 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT || moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE) { - serialPrint->printf("%s", p.payload.bytes); + serialPrint->write(p.payload.bytes, p.payload.size); } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG) { meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp)); String sender = (node && node->has_user) ? node->user.short_name : "???"; From 939a359e7e1e63d57ca3926ecc6f70a59655e9b9 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 31 Jul 2023 15:19:36 -0500 Subject: [PATCH 6/7] Adds DOP fields to JSON MQTT output (#2671) Co-authored-by: Ben Meadors --- src/mqtt/MQTT.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index bbdb65c87..a7a6b662b 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -607,6 +607,15 @@ std::string MQTT::meshPacketToJson(meshtastic_MeshPacket *mp) if (int(decoded->sats_in_view)) { msgPayload["sats_in_view"] = new JSONValue((int)decoded->sats_in_view); } + if ((int)decoded->PDOP) { + msgPayload["PDOP"] = new JSONValue((int)decoded->PDOP); + } + if ((int)decoded->HDOP) { + msgPayload["HDOP"] = new JSONValue((int)decoded->HDOP); + } + if ((int)decoded->VDOP) { + msgPayload["VDOP"] = new JSONValue((int)decoded->VDOP); + } jsonObj["payload"] = new JSONValue(msgPayload); } else { LOG_ERROR("Error decoding protobuf for position message!\n"); From b799b7bf6278448836d631595d7cbf6e5d452af7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:51:15 -0500 Subject: [PATCH 7/7] [create-pull-request] automated change (#2672) Co-authored-by: thebentern --- protobufs | 2 +- src/mesh/generated/meshtastic/admin.pb.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/protobufs b/protobufs index 6f88374ec..8e7500278 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 6f88374ec6939fabc3ef79771843c291db063fae +Subproject commit 8e7500278f32a0f8096961843aad9b431916dcb0 diff --git a/src/mesh/generated/meshtastic/admin.pb.h b/src/mesh/generated/meshtastic/admin.pb.h index b6162b846..aa39244ff 100644 --- a/src/mesh/generated/meshtastic/admin.pb.h +++ b/src/mesh/generated/meshtastic/admin.pb.h @@ -53,7 +53,9 @@ typedef enum _meshtastic_AdminMessage_ModuleConfigType { /* TODO: REPLACE */ meshtastic_AdminMessage_ModuleConfigType_AUDIO_CONFIG = 7, /* TODO: REPLACE */ - meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG = 8 + meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG = 8, + /* TODO: REPLACE */ + meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG = 10 } meshtastic_AdminMessage_ModuleConfigType; /* Struct definitions */ @@ -172,8 +174,8 @@ extern "C" { #define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG+1)) #define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG -#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG -#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG+1)) +#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG +#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG+1)) #define meshtastic_AdminMessage_payload_variant_get_config_request_ENUMTYPE meshtastic_AdminMessage_ConfigType #define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType