From a8c216f4f8a158034754d1b8ea2613dfd4b54cb6 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Fri, 11 Oct 2024 16:41:41 -0500 Subject: [PATCH 1/7] Update main_matrix.yml -- re-enable x86_64 .deb builds --- .github/workflows/main_matrix.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 555d4d092..80484325c 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -308,15 +308,15 @@ jobs: asset_name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb asset_content_type: application/vnd.debian.binary-package - # - name: Add raspbian amd64 .deb - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb - # asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb - # asset_content_type: application/vnd.debian.binary-package + - name: Add raspbian amd64 .deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb + asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb + asset_content_type: application/vnd.debian.binary-package - name: Bump version.properties run: >- From 4e4431560e78cf1e5e8ccb2e22fa97a9fe0a20d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 11 Oct 2024 16:29:16 +0200 Subject: [PATCH 2/7] Permanently engage !CTRL switching RXEN is not fast enough and not in sync with DIO2. This pin needs to be permanently encabled, like on RAK4631. --- variants/rp2040-lora/variant.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variants/rp2040-lora/variant.h b/variants/rp2040-lora/variant.h index f1826605f..7d8e9ba7c 100644 --- a/variants/rp2040-lora/variant.h +++ b/variants/rp2040-lora/variant.h @@ -55,6 +55,6 @@ #define SX126X_BUSY LORA_BUSY #define SX126X_RESET LORA_RESET #define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL -#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17 +#define SX126X_POWER_EN LORA_DIO4 // Antenna switch !CTRL via GPIO17 // #define SX126X_DIO3_TCXO_VOLTAGE 1.8 -#endif \ No newline at end of file +#endif From 323e7503eaf4240f4607a3ba9a099205629a1e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 11 Oct 2024 17:55:45 +0200 Subject: [PATCH 3/7] trunk fmt --- variants/rp2040-lora/variant.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variants/rp2040-lora/variant.h b/variants/rp2040-lora/variant.h index 7d8e9ba7c..c93105f0e 100644 --- a/variants/rp2040-lora/variant.h +++ b/variants/rp2040-lora/variant.h @@ -54,7 +54,7 @@ #define SX126X_DIO1 LORA_DIO1 #define SX126X_BUSY LORA_BUSY #define SX126X_RESET LORA_RESET -#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL -#define SX126X_POWER_EN LORA_DIO4 // Antenna switch !CTRL via GPIO17 +#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL +#define SX126X_POWER_EN LORA_DIO4 // Antenna switch !CTRL via GPIO17 // #define SX126X_DIO3_TCXO_VOLTAGE 1.8 #endif From 363fd8ab9800d46baec949c2baa6271df5e6dccc Mon Sep 17 00:00:00 2001 From: mverch67 Date: Fri, 27 Sep 2024 15:14:22 +0200 Subject: [PATCH 4/7] fix GPIO0 mode after I2S audio --- src/modules/ExternalNotificationModule.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index 8abc386ec..2306119b1 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -98,6 +98,13 @@ int32_t ExternalNotificationModule::runOnce() LOG_INFO("%d ", i); } LOG_INFO("\n"); +#ifdef HAS_I2S + // GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library + // T-Deck uses GPIO0 as trackball button, so restore the mode +#if defined(T_DECK) || (defined(BUTTON_PIN) && BUTTON_PIN == 0) + pinMode(0, INPUT); +#endif +#endif isNagging = false; return INT32_MAX; // save cycles till we're needed again } From 015f7335b0190d8edfc60b2a91e56007d9eb28e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 12 Oct 2024 10:34:22 +0200 Subject: [PATCH 5/7] enable native build stage --- .github/workflows/main_matrix.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 80484325c..0853df19f 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -134,8 +134,8 @@ jobs: package-raspbian-armv7l: uses: ./.github/workflows/package_raspbian_armv7l.yml - # package-native: - # uses: ./.github/workflows/package_amd64.yml + package-native: + uses: ./.github/workflows/package_amd64.yml after-checks: runs-on: ubuntu-latest @@ -249,7 +249,7 @@ jobs: gather-artifacts, package-raspbian, package-raspbian-armv7l, - # package-native, + package-native, ] steps: - name: Checkout From 37448205b513f41d3631e7d0733f3227743dde4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 06:16:53 -0500 Subject: [PATCH 6/7] [create-pull-request] automated change (#5041) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobufs b/protobufs index fd5760108..49ebc4783 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit fd5760108a2399ca58cd7df280afe2b434aae2c2 +Subproject commit 49ebc4783275f108a9f8723ca52a6edf0a954c55 From fb9f3610529f961c1c43464a34e002e7f0779209 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 12 Oct 2024 06:17:44 -0500 Subject: [PATCH 7/7] Implement rebroadcast mode NONE (#5040) * Implement rebroadcast mode none * Correct debug message --- src/mesh/FloodingRouter.cpp | 10 ++++++++-- src/mesh/FloodingRouter.h | 2 ++ src/modules/AdminModule.cpp | 17 +++++++++++++++++ src/modules/AdminModule.h | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/mesh/FloodingRouter.cpp b/src/mesh/FloodingRouter.cpp index 23f6b6f92..33166e3e5 100644 --- a/src/mesh/FloodingRouter.cpp +++ b/src/mesh/FloodingRouter.cpp @@ -35,6 +35,12 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p) return Router::shouldFilterReceived(p); } +bool FloodingRouter::isRebroadcaster() +{ + return config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE && + config.device.rebroadcast_mode != meshtastic_Config_DeviceConfig_RebroadcastMode_NONE; +} + void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) { bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0); @@ -45,7 +51,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas } if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) { if (p->id != 0) { - if (config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) { + if (isRebroadcaster()) { meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it tosend->hop_limit--; // bump down the hop count @@ -62,7 +68,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas // We are careful not to call our hooked version of send() - because we don't want to check this again Router::send(tosend); } else { - LOG_DEBUG("Not rebroadcasting. Role = Role_ClientMute\n"); + LOG_DEBUG("Not rebroadcasting: Role = CLIENT_MUTE or Rebroadcast Mode = NONE\n"); } } else { LOG_DEBUG("Ignoring 0 id broadcast\n"); diff --git a/src/mesh/FloodingRouter.h b/src/mesh/FloodingRouter.h index a3adfe70c..0ed2b5582 100644 --- a/src/mesh/FloodingRouter.h +++ b/src/mesh/FloodingRouter.h @@ -29,6 +29,8 @@ class FloodingRouter : public Router, protected PacketHistory { private: + bool isRebroadcaster(); + public: /** * Constructor diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 01ef038e8..79fc67515 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -451,6 +451,14 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) requiresReboot = false; } config.device = c.payload_variant.device; + if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_NONE && + IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER, + meshtastic_Config_DeviceConfig_Role_REPEATER)) { + config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_ALL; + const char *warning = "Rebroadcast mode can't be set to NONE for a router or repeater\n"; + LOG_WARN(warning); + sendWarning(warning); + } // If we're setting router role for the first time, install its intervals if (existingRole != c.payload_variant.device.role) nodeDB->installRoleDefaults(c.payload_variant.device.role); @@ -1064,6 +1072,15 @@ bool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r) return false; } +void AdminModule::sendWarning(const char *message) +{ + meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); + cn->level = meshtastic_LogRecord_Level_WARNING; + cn->time = getValidTime(RTCQualityFromNet); + strncpy(cn->message, message, sizeof(cn->message)); + service->sendClientNotification(cn); +} + void disableBluetooth() { #if HAS_BLUETOOTH diff --git a/src/modules/AdminModule.h b/src/modules/AdminModule.h index d6c0a7343..e54b89af1 100644 --- a/src/modules/AdminModule.h +++ b/src/modules/AdminModule.h @@ -57,6 +57,7 @@ class AdminModule : public ProtobufModule, public Obser bool messageIsResponse(const meshtastic_AdminMessage *r); bool messageIsRequest(const meshtastic_AdminMessage *r); + void sendWarning(const char *message); }; extern AdminModule *adminModule;