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: . diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 8805b0716..fca748ff1 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 7b5e04abb..4dd2eb261 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 d23ed886f..8c000519a 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -23,7 +23,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 d4fc48d6a..6c360e1ce 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 5a5edcde3..eaff1cb0c 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 diff --git a/protobufs b/protobufs index 5f3daac5f..e4396fd49 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 5f3daac5fabdfe2a0561395fed0ba11a38ba3e7e +Subproject commit e4396fd499769f24c265985ae0ee7be05c18f65a 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/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 307a5d85b..565a08ff9 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -225,6 +225,15 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.has_store_forward = true; moduleConfig.has_telemetry = true; moduleConfig.has_external_notification = true; +#if defined(RAK4630) || defined(RAK11310) + // Default to RAK led pin 2 (blue) + moduleConfig.external_notification.enabled = true; + moduleConfig.external_notification.output = PIN_LED2; + moduleConfig.external_notification.active = true; + moduleConfig.external_notification.alert_message = true; + moduleConfig.external_notification.output_ms = 1000; + moduleConfig.external_notification.nag_timeout = 60; +#endif moduleConfig.has_canned_message = true; strncpy(moduleConfig.mqtt.address, default_mqtt_address, sizeof(moduleConfig.mqtt.address)); @@ -290,9 +299,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 +384,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]; @@ -908,4 +916,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting..."); exit(2); #endif -} \ No newline at end of file +} diff --git a/src/mesh/NodeDB.h b/src/mesh/NodeDB.h index 83d9e252f..7c8972861 100644 --- a/src/mesh/NodeDB.h +++ b/src/mesh/NodeDB.h @@ -252,4 +252,4 @@ extern uint32_t error_address; #define Module_Config_size \ (ModuleConfig_CannedMessageConfig_size + ModuleConfig_ExternalNotificationConfig_size + ModuleConfig_MQTTConfig_size + \ ModuleConfig_RangeTestConfig_size + ModuleConfig_SerialConfig_size + ModuleConfig_StoreForwardConfig_size + \ - ModuleConfig_TelemetryConfig_size + ModuleConfig_size) \ No newline at end of file + ModuleConfig_TelemetryConfig_size + ModuleConfig_size) diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index 48f93da5e..d0c3b7bd8 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -153,7 +153,7 @@ typedef struct _meshtastic_DeviceState { /* The mesh's nodes with their available gpio pins for RemoteHardware module */ pb_size_t node_remote_hardware_pins_count; meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12]; - /* New lite version of NodeDB to decrease */ + /* New lite version of NodeDB to decrease memory footprint */ pb_size_t node_db_lite_count; meshtastic_NodeInfoLite node_db_lite[80]; } meshtastic_DeviceState; 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; diff --git a/version.properties b/version.properties index 1b9a7da4f..5cc440cdd 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 1 -build = 17 +build = 18