From ccb682bbb874e078771a449561b869f293a37655 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Tue, 27 Jun 2023 02:26:12 +0200 Subject: [PATCH 1/4] Call getMacAddr within pickNewNodeNum() (#2576) It could be called from within NodeDB::init() before it is set --- src/mesh/NodeDB.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 307a5d85b..b3841afe2 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -290,9 +290,6 @@ void NodeDB::installDefaultDeviceState() generatePacketId(); // FIXME - ugly way to init current_packet_id; - // Init our blank owner info to reasonable defaults - getMacAddr(ourMacAddr); - // Set default owner name pickNewNodeNum(); // based on macaddr now snprintf(owner.long_name, sizeof(owner.long_name), "Meshtastic %02x%02x", ourMacAddr[4], ourMacAddr[5]); @@ -378,6 +375,8 @@ void NodeDB::pickNewNodeNum() { NodeNum r = myNodeInfo.my_node_num; + getMacAddr(ourMacAddr); // Make sure ourMacAddr is set + // Pick an initial nodenum based on the macaddr r = (ourMacAddr[2] << 24) | (ourMacAddr[3] << 16) | (ourMacAddr[4] << 8) | ourMacAddr[5]; From 44a906dd01488f66cca5a4fea347fb1e05f2e3cc Mon Sep 17 00:00:00 2001 From: charminULTRA Date: Mon, 26 Jun 2023 20:59:44 -0400 Subject: [PATCH 2/4] RAK14001 LED - Turn on to 50% at boot (#2571) * Addition of RAK 14001 functionality to start and stay on for boot * Fixing via Trunk --------- Co-authored-by: Ben Meadors --- src/graphics/RAKled.h | 7 +++++++ src/main.cpp | 10 ++++++++++ src/modules/ExternalNotificationModule.cpp | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/graphics/RAKled.h diff --git a/src/graphics/RAKled.h b/src/graphics/RAKled.h new file mode 100644 index 000000000..06e2a717f --- /dev/null +++ b/src/graphics/RAKled.h @@ -0,0 +1,7 @@ +#include "main.h" + +#ifdef RAK4630 +#include +extern NCP5623 rgb; + +#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 937f9091a..c867930d0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,7 @@ #include "detect/ScanI2CTwoWire.h" #include "detect/axpDebug.h" #include "detect/einkScan.h" +#include "graphics/RAKled.h" #include "graphics/Screen.h" #include "main.h" #include "mesh/generated/meshtastic/config.pb.h" @@ -360,6 +361,15 @@ void setup() // Only one supported RGB LED currently rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); +// Start the RGB LED at 50% +#ifdef RAK4630 + if (rgb_found.type == ScanI2C::NCP5623) { + rgb.begin(); + rgb.setCurrent(10); + rgb.setColor(128, 128, 128); + } +#endif + #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) auto acc_info = i2cScanner->firstAccelerometer(); accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found; diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index 7dbf78a08..82701cdc0 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -11,7 +11,7 @@ #include "main.h" #ifdef RAK4630 -#include +#include NCP5623 rgb; uint8_t red = 0; From d0cf70c8b3effe39ab86cc95a6be71c1e17e8393 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 27 Jun 2023 06:59:28 -0500 Subject: [PATCH 3/4] Remove docker steps from PR build process --- .github/workflows/main_matrix.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index caf04fff6..1cac7479b 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -150,12 +150,14 @@ jobs: release/device-*.bat - name: Docker login + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} uses: docker/login-action@v2 with: username: meshtastic password: ${{ secrets.DOCKER_TOKEN }} - name: Docker setup + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} uses: docker/setup-buildx-action@v2 - name: Docker build and push tagged versions @@ -168,7 +170,7 @@ jobs: tags: meshtastic/device-simulator:${{ steps.version.outputs.version }} - name: Docker build and push - if: github.ref == 'refs/heads/master' + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} uses: docker/build-push-action@v3 with: context: . From 9e2b86b92c90d8f21c12de8fbcb7eab5e3c890ce Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 27 Jun 2023 07:08:32 -0500 Subject: [PATCH 4/4] Bump RadioLib to 6.1.0 (#2577) * Bump RadioLib to 6.1.0 * RP2040 * More excludes * Jan added a lot of stuff apparently * Stay back a version on portduino for now * It wasn't this. I need to remove the docker build from ci --- arch/esp32/esp32.ini | 4 ++-- arch/nrf52/nrf52.ini | 5 ++--- arch/portduino/portduino.ini | 2 +- arch/rp2040/rp2040.ini | 2 +- arch/stm32/stm32wl5e.ini | 4 ++-- platformio.ini | 6 ++++++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 961b41852..62a943ece 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -37,7 +37,7 @@ lib_deps = ${environmental_base.lib_deps} https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 h2zero/NimBLE-Arduino@^1.4.0 - jgromes/RadioLib@^6.0.0 + jgromes/RadioLib@^6.1.0 https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f @@ -55,4 +55,4 @@ lib_ignore = ; customize the partition table ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables -board_build.partitions = partition-table.csv +board_build.partitions = partition-table.csv \ No newline at end of file diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index d471e24c5..f44054f24 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -13,8 +13,7 @@ build_src_filter = lib_deps= ${arduino_base.lib_deps} - jgromes/RadioLib@^6.0.0 + jgromes/RadioLib@^6.1.0 lib_ignore = - BluetoothOTA - + BluetoothOTA \ No newline at end of file diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 351c7e65c..b39974853 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -22,7 +22,7 @@ lib_deps = ${env.lib_deps} ${networking_base.lib_deps} rweather/Crypto@^0.4.0 - jgromes/RadioLib@^6.0.0 + jgromes/RadioLib@6.1.0 build_flags = ${arduino_base.build_flags} diff --git a/arch/rp2040/rp2040.ini b/arch/rp2040/rp2040.ini index 2eaa496e1..52fba9cba 100644 --- a/arch/rp2040/rp2040.ini +++ b/arch/rp2040/rp2040.ini @@ -20,5 +20,5 @@ lib_ignore = lib_deps = ${arduino_base.lib_deps} ${environmental_base.lib_deps} - jgromes/RadioLib@^6.0.0 + jgromes/RadioLib@^6.1.0 https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b \ No newline at end of file diff --git a/arch/stm32/stm32wl5e.ini b/arch/stm32/stm32wl5e.ini index d3d577a9f..819ecc31c 100644 --- a/arch/stm32/stm32wl5e.ini +++ b/arch/stm32/stm32wl5e.ini @@ -20,10 +20,10 @@ upload_protocol = stlink lib_deps = ${env.lib_deps} - jgromes/RadioLib@^6.0.0 + jgromes/RadioLib@^6.1.0 https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b https://github.com/littlefs-project/littlefs.git#v2.5.1 https://github.com/stm32duino/STM32FreeRTOS.git#10.3.1 lib_ignore = - https://github.com/mathertel/OneButton#2.1.0 + https://github.com/mathertel/OneButton#2.1.0 \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 9abb56b7a..b580d7160 100644 --- a/platformio.ini +++ b/platformio.ini @@ -56,6 +56,12 @@ build_flags = -Wno-missing-field-initializers -DRADIOLIB_EXCLUDE_MORSE -DRADIOLIB_EXCLUDE_RTTY -DRADIOLIB_EXCLUDE_SSTV + -DRADIOLIB_EXCLUDE_AX25 + -DRADIOLIB_EXCLUDE_DIRECT_RECEIVE + -DRADIOLIB_EXCLUDE_BELL + -DRADIOLIB_EXCLUDE_PAGER + -DRADIOLIB_EXCLUDE_FSK4 + -DRADIOLIB_EXCLUDE_APRS monitor_speed = 115200