From 600208ab0bd002d95fc5681040598816db7fc4ac Mon Sep 17 00:00:00 2001 From: Alexander Begoon Date: Thu, 31 Oct 2024 21:07:59 +0100 Subject: [PATCH 1/8] Refactor getMacAddr function to retrieve MAC address as MAC-48 for IEEE 802.15.4 compatibility (#5208) --- src/platform/esp32/main-esp32.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index 7b3493f95..b1185e283 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -51,7 +51,11 @@ void updateBatteryLevel(uint8_t level) {} void getMacAddr(uint8_t *dmac) { +#if defined(CONFIG_IDF_TARGET_ESP32C6) && defined(CONFIG_SOC_IEEE802154_SUPPORTED) + assert(esp_base_mac_addr_get(dmac) == ESP_OK); +#else assert(esp_efuse_mac_get_default(dmac) == ESP_OK); +#endif } #ifdef HAS_32768HZ From 7912c214c7a4a6673a4681082f84d37f3adb76b9 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 31 Oct 2024 15:09:27 -0500 Subject: [PATCH 2/8] Increase NimBLE stack size (#5202) --- arch/esp32/esp32.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 36d8b9542..382975e9f 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -31,7 +31,7 @@ build_flags = -DCONFIG_BT_NIMBLE_ENABLED -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 - -DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120 + -DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192 -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING -DSERIAL_BUFFER_SIZE=4096 -DLIBPAX_ARDUINO From 545ebf9b17a8bffe8b7a73a440ac01fe32870f0e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 31 Oct 2024 19:44:02 -0500 Subject: [PATCH 3/8] Don't skip GPS serial speeds, and always land on GPS_BAUDRATE (#5195) * Don't skip GPS serial speeds, and always land on GPS_BAUDRATE * Update log message to match. * print the value instead --- src/gps/GPS.cpp | 4 ++-- src/gps/GPS.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index e81331760..1e9e21224 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -421,7 +421,7 @@ bool GPS::setup() if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) { // if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate. - if (speedSelect == 0 && GPS_BAUDRATE != serialSpeeds[speedSelect]) { + if (speedSelect == 0 && probeTries == 2 && GPS_BAUDRATE != serialSpeeds[speedSelect]) { speedSelect = std::find(serialSpeeds, std::end(serialSpeeds), GPS_BAUDRATE) - serialSpeeds; } @@ -431,7 +431,7 @@ bool GPS::setup() if (++speedSelect == sizeof(serialSpeeds) / sizeof(int)) { speedSelect = 0; if (--probeTries == 0) { - LOG_WARN("Giving up on GPS probe and setting to 9600."); + LOG_WARN("Giving up on GPS probe and setting to %d", GPS_BAUDRATE); return true; } } diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 533f6b525..240d087f2 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -76,7 +76,7 @@ class GPS : private concurrency::OSThread uint8_t fixType = 0; // fix type from GPGSA #endif private: - const int serialSpeeds[6] = {9600, 115200, 38400, 4800, 57600, 9600}; + const int serialSpeeds[6] = {9600, 115200, 38400, 4800, 57600, GPS_BAUDRATE}; uint32_t lastWakeStartMsec = 0, lastSleepStartMsec = 0, lastFixStartMsec = 0; uint32_t rx_gpio = 0; uint32_t tx_gpio = 0; From 732cf4832a9fc0d67f4bfb1b3f64426157ae9a13 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Nov 2024 05:20:00 -0500 Subject: [PATCH 4/8] Bump version since I killed the PR --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 58380fa5e..b9deaacb2 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 5 -build = 9 +build = 10 From 7e3c369e8768627e0a651eee96eda1be1a5f92be Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Nov 2024 05:58:48 -0500 Subject: [PATCH 5/8] Trunk fmt on comment --- .github/workflows/trunk_format_pr.yml | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/trunk_format_pr.yml diff --git a/.github/workflows/trunk_format_pr.yml b/.github/workflows/trunk_format_pr.yml new file mode 100644 index 000000000..d9b584a12 --- /dev/null +++ b/.github/workflows/trunk_format_pr.yml @@ -0,0 +1,45 @@ +name: Run Trunk Fmt on PR Comment + +on: + issue_comment: + types: [created] + +jobs: + trunk-fmt: + if: github.event.issue.pull_request != null && contains(github.event.comment.body, 'trunk fmt') + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + token: ${{ secrets.ARTIFACTS_TOKEN }} + + - name: Set up Trunk + run: | + curl -fsSL https://get.trunk.io -o get-trunk.sh + sh get-trunk.sh -y + + - name: Run Trunk Fmt + run: trunk fmt + + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Add firmware version ${{ steps.version.outputs.version }}" + git push + + - name: Comment on PR + uses: actions/github-script@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '`trunk fmt` has been run on this PR.' + }) From 9c06c492d9d5f3e343dbf225a9850672c194fd12 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Nov 2024 06:04:14 -0500 Subject: [PATCH 6/8] Use one from the other PR --- .github/workflows/trunk_format_pr.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trunk_format_pr.yml b/.github/workflows/trunk_format_pr.yml index d9b584a12..267a5cc54 100644 --- a/.github/workflows/trunk_format_pr.yml +++ b/.github/workflows/trunk_format_pr.yml @@ -16,10 +16,8 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} token: ${{ secrets.ARTIFACTS_TOKEN }} - - name: Set up Trunk - run: | - curl -fsSL https://get.trunk.io -o get-trunk.sh - sh get-trunk.sh -y + - name: Install trunk + run: curl https://get.trunk.io -fsSL | bash - name: Run Trunk Fmt run: trunk fmt From 10dd8af61485a139b25fe4185f5b453abd31c4e8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Nov 2024 06:10:42 -0500 Subject: [PATCH 7/8] Eh? --- .github/workflows/trunk_format_pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trunk_format_pr.yml b/.github/workflows/trunk_format_pr.yml index 267a5cc54..a6e527c4f 100644 --- a/.github/workflows/trunk_format_pr.yml +++ b/.github/workflows/trunk_format_pr.yml @@ -13,8 +13,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.ARTIFACTS_TOKEN }} + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} - name: Install trunk run: curl https://get.trunk.io -fsSL | bash From 8462d65f762ada36c38f813e43ba50b0a0946863 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 07:50:40 -0500 Subject: [PATCH 8/8] Bump actions/github-script from 5 to 7 in /.github/workflows (#5214) Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v5...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/trunk_format_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trunk_format_pr.yml b/.github/workflows/trunk_format_pr.yml index a6e527c4f..c5c20b465 100644 --- a/.github/workflows/trunk_format_pr.yml +++ b/.github/workflows/trunk_format_pr.yml @@ -31,7 +31,7 @@ jobs: git push - name: Comment on PR - uses: actions/github-script@v5 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: |