diff --git a/.github/workflows/build_esp32.yml b/.github/workflows/build_esp32.yml index 7d069e3db..4fc31f22c 100644 --- a/.github/workflows/build_esp32.yml +++ b/.github/workflows/build_esp32.yml @@ -7,6 +7,8 @@ on: required: true type: string +permissions: read-all + jobs: build-esp32: runs-on: ubuntu-latest @@ -24,6 +26,7 @@ jobs: ./arch/esp32/esp32s2.ini ./arch/esp32/esp32s3.ini ./arch/esp32/esp32c3.ini + ./arch/esp32/esp32c6.ini build-script-path: bin/build-esp32.sh ota-firmware-source: firmware.bin ota-firmware-target: release/bleota.bin diff --git a/.github/workflows/build_esp32_c3.yml b/.github/workflows/build_esp32_c3.yml index 5234dbe81..546762952 100644 --- a/.github/workflows/build_esp32_c3.yml +++ b/.github/workflows/build_esp32_c3.yml @@ -26,10 +26,12 @@ jobs: ./arch/esp32/esp32s2.ini ./arch/esp32/esp32s3.ini ./arch/esp32/esp32c3.ini + ./arch/esp32/esp32c6.ini build-script-path: bin/build-esp32.sh ota-firmware-source: firmware-c3.bin ota-firmware-target: release/bleota-c3.bin artifact-paths: | release/*.bin release/*.elf + include-web-ui: true arch: esp32c3 diff --git a/.github/workflows/build_esp32_c6.yml b/.github/workflows/build_esp32_c6.yml index 66f2764a6..56d4d806d 100644 --- a/.github/workflows/build_esp32_c6.yml +++ b/.github/workflows/build_esp32_c6.yml @@ -33,4 +33,5 @@ jobs: artifact-paths: | release/*.bin release/*.elf + include-web-ui: true arch: esp32c6 diff --git a/.github/workflows/build_esp32_s3.yml b/.github/workflows/build_esp32_s3.yml index 554b37cef..a9c067ee1 100644 --- a/.github/workflows/build_esp32_s3.yml +++ b/.github/workflows/build_esp32_s3.yml @@ -7,6 +7,8 @@ on: required: true type: string +permissions: read-all + jobs: build-esp32-s3: runs-on: ubuntu-latest @@ -24,6 +26,7 @@ jobs: ./arch/esp32/esp32s2.ini ./arch/esp32/esp32s3.ini ./arch/esp32/esp32c3.ini + ./arch/esp32/esp32c6.ini build-script-path: bin/build-esp32.sh ota-firmware-source: firmware-s3.bin ota-firmware-target: release/bleota-s3.bin diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 976951b4f..39d1c0b8c 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -32,6 +32,7 @@ build_flags = -Isrc/platform/portduino -DRADIOLIB_EEPROM_UNSUPPORTED -DPORTDUINO_LINUX_HARDWARE + -lstdc++fs -lbluetooth -lgpiod -lyaml-cpp diff --git a/protobufs b/protobufs index 06cf134e2..034a18143 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 06cf134e2b3d035c3ca6cbbb90b4c017d4715398 +Subproject commit 034a18143632d4cf17e0acfff66915646f217c27 diff --git a/src/configuration.h b/src/configuration.h index 33f11bd76..15912be3f 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -153,8 +153,9 @@ along with this program. If not, see . // ACCELEROMETER // ----------------------------------------------------------------------------- #define MPU6050_ADDR 0x68 -#define STK8BXX_ADR 0x18 -#define LIS3DH_ADR 0x18 +#define STK8BXX_ADDR 0x18 +#define LIS3DH_ADDR 0x18 +#define LIS3DH_ADDR_ALT 0x19 #define BMA423_ADDR 0x19 #define LSM6DS3_ADDR 0x6A #define BMX160_ADDR 0x69 diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 995acbdb1..ef5e5ee00 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -409,7 +409,17 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) #else SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031 air quality sensor found") #endif - SCAN_SIMPLE_CASE(BMA423_ADDR, BMA423, "BMA423 accelerometer found"); + case BMA423_ADDR: // this can also be LIS3DH_ADDR_ALT + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 2); + if (registerValue == 0x3300 || registerValue == 0x3333) { // RAK4631 WisBlock has LIS3DH register at 0x3333 + type = LIS3DH; + LOG_INFO("LIS3DH accelerometer found"); + } else { + type = BMA423; + LOG_INFO("BMA423 accelerometer found"); + } + break; + SCAN_SIMPLE_CASE(LSM6DS3_ADDR, LSM6DS3, "LSM6DS3 accelerometer found at address 0x%x", (uint8_t)addr.address); SCAN_SIMPLE_CASE(TCA9535_ADDR, TCA9535, "TCA9535 I2C expander found"); SCAN_SIMPLE_CASE(TCA9555_ADDR, TCA9555, "TCA9555 I2C expander found"); diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 662fcf2bc..099a21f82 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -794,7 +794,7 @@ void GPS::writePinEN(bool on) // Write and log enablePin->set(on); #ifdef GPS_DEBUG - LOG_DEBUG("Pin EN %s", val == HIGH ? "HI" : "LOW"); + LOG_DEBUG("Pin EN %s", on == HIGH ? "HI" : "LOW"); #endif } diff --git a/src/mesh/StreamAPI.h b/src/mesh/StreamAPI.h index 45cbb231c..6e0364bc1 100644 --- a/src/mesh/StreamAPI.h +++ b/src/mesh/StreamAPI.h @@ -3,6 +3,7 @@ #include "PhoneAPI.h" #include "Stream.h" #include "concurrency/OSThread.h" +#include // A To/FromRadio packet + our 32 bit header #define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t)) diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index a90e72244..39d056061 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -81,7 +81,7 @@ typedef struct _meshtastic_NodeInfoLite { uint8_t channel; /* True if we witnessed the node over MQTT instead of LoRA transport */ bool via_mqtt; - /* Number of hops away from us this node is (0 if adjacent) */ + /* Number of hops away from us this node is (0 if direct neighbor) */ bool has_hops_away; uint8_t hops_away; /* True if node is in our favorites list diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 8b49d3195..e45d60a19 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -720,7 +720,7 @@ typedef struct _meshtastic_MeshPacket { Set during reception to indicate the SNR of this packet. Used to collect statistics on current link quality. */ float rx_snr; - /* If unset treated as zero (no forwarding, send to adjacent nodes only) + /* If unset treated as zero (no forwarding, send to direct neighbor nodes only) if 1, allow hopping through one node, etc... For our usecase real world topologies probably have a max of about 3. This field is normally placed into a few of bits in the header. */ @@ -791,7 +791,7 @@ typedef struct _meshtastic_NodeInfo { uint8_t channel; /* True if we witnessed the node over MQTT instead of LoRA transport */ bool via_mqtt; - /* Number of hops away from us this node is (0 if adjacent) */ + /* Number of hops away from us this node is (0 if direct neighbor) */ bool has_hops_away; uint8_t hops_away; /* True if node is in our favorites list diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index b7def8242..f80d3eb67 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -16,10 +16,7 @@ #include "meshtastic/atak.pb.h" #include "sleep.h" #include "target_specific.h" - -extern "C" { #include -} PositionModule *positionModule; diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 64e936e29..c18944ebd 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -376,12 +376,14 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m LOG_INFO("AHTX0+BMP280 module detected: using temp from BMP280 and humy from AHTX0"); aht10Sensor.getMetrics(&m_ahtx); m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity; + m->variant.environment_metrics.has_relative_humidity = m_ahtx.variant.environment_metrics.has_relative_humidity; } else { // prefer bmp3xx temp if both sensors are present, fetch only humidity meshtastic_Telemetry m_ahtx = meshtastic_Telemetry_init_zero; LOG_INFO("AHTX0+BMP3XX module detected: using temp from BMP3XX and humy from AHTX0"); aht10Sensor.getMetrics(&m_ahtx); m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity; + m->variant.environment_metrics.has_relative_humidity = m_ahtx.variant.environment_metrics.has_relative_humidity; } } if (max17048Sensor.hasSensor()) { diff --git a/variants/portduino/platformio.ini b/variants/portduino/platformio.ini index 46417e388..aa11142f7 100644 --- a/variants/portduino/platformio.ini +++ b/variants/portduino/platformio.ini @@ -2,7 +2,8 @@ extends = portduino_base ; The pkg-config commands below optionally add link flags. ; the || : is just a "or run the null command" to avoid returning an error code -build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino -I /usr/include +build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino + -I /usr/include !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : board = cross_platform