diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 04f57c924..d2e2fd9c5 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -1,7 +1,7 @@ ; Common settings for ESP targes, mixin with extends = esp32_base [esp32_base] extends = arduino_base -platform = espressif32@5.1.1 +platform = espressif32@^5.2.0 build_src_filter = ${arduino_base.build_src_filter} - - - upload_speed = 921600 @@ -31,10 +31,10 @@ lib_deps = ${arduino_base.lib_deps} ${networking_base.lib_deps} ${environmental_base.lib_deps} - https://github.com/meshtastic/esp32_https_server.git - h2zero/NimBLE-Arduino@1.4.0 + https://github.com/meshtastic/esp32_https_server.git#657509856ce97e9dddeffb89a559f544faefd5cd + h2zero/NimBLE-Arduino@^1.4.0 arduino-libraries/NTPClient@^3.1.0 - https://github.com/lewisxhe/XPowersLib.git + https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 lib_ignore = segger_rtt diff --git a/arch/esp32/esp32s3.ini b/arch/esp32/esp32s3.ini index dbf1a5df6..e19b9aaf7 100644 --- a/arch/esp32/esp32s3.ini +++ b/arch/esp32/esp32s3.ini @@ -1,6 +1,6 @@ [esp32s3_base] extends = arduino_base -platform = espressif32@5.1.1 +platform = espressif32@^5.2.0 build_src_filter = ${arduino_base.build_src_filter} - - - upload_speed = 961200 @@ -31,10 +31,10 @@ lib_deps = ${arduino_base.lib_deps} ${networking_base.lib_deps} ${environmental_base.lib_deps} - https://github.com/meshtastic/esp32_https_server.git - h2zero/NimBLE-Arduino@1.4.0 + https://github.com/meshtastic/esp32_https_server.git#657509856ce97e9dddeffb89a559f544faefd5cd + h2zero/NimBLE-Arduino@^1.4.0 arduino-libraries/NTPClient@^3.1.0 - https://github.com/lewisxhe/XPowersLib.git + https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 lib_ignore = segger_rtt diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini index 61995378e..29c32e795 100644 --- a/arch/nrf52/nrf52840.ini +++ b/arch/nrf52/nrf52840.ini @@ -4,7 +4,7 @@ build_flags = ${nrf52_base.build_flags} lib_deps = ${arduino_base.lib_deps} ${environmental_base.lib_deps} - https://github.com/Kongduino/Adafruit_nRFCrypto.git + https://github.com/Kongduino/Adafruit_nRFCrypto.git#20fc7fdaf086bd70e901c007dd23c6e8856aec25 ; Note: By default no lora device is created for this build - it uses a simulated interface [env:nrf52840dk] diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index b1f793fe6..eb65322d4 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -14,6 +14,6 @@ build_src_filter = lib_deps = ${env.lib_deps} ${networking_base.lib_deps} - rweather/Crypto + rweather/Crypto@^0.4.0 https://github.com/meshtastic/RadioLib.git#5582ac30578ff3f53f20630a00b2a8a4b8f92c74 build_flags = ${arduino_base.build_flags} -Isrc/platform/portduino diff --git a/arch/rp2040/rp2040.ini b/arch/rp2040/rp2040.ini index 742909e59..6660cccd2 100644 --- a/arch/rp2040/rp2040.ini +++ b/arch/rp2040/rp2040.ini @@ -16,4 +16,4 @@ lib_ignore = lib_deps = ${arduino_base.lib_deps} ${environmental_base.lib_deps} - https://github.com/kokke/tiny-AES-c.git + https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b diff --git a/arch/stm32/stm32wl5e.ini b/arch/stm32/stm32wl5e.ini index 862d1c9ce..50d48501b 100644 --- a/arch/stm32/stm32wl5e.ini +++ b/arch/stm32/stm32wl5e.ini @@ -13,7 +13,7 @@ build_src_filter = ${arduino_base.build_src_filter} - - - - - - - - - - - - - lib_deps = ${env.lib_deps} - https://github.com/jgromes/RadioLib.git - https://github.com/kokke/tiny-AES-c.git + jgromes/RadioLib@^5.4.0 + https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b lib_ignore = mathertel/OneButton@^2.0.3 diff --git a/bin/check-dependencies.sh b/bin/check-dependencies.sh new file mode 100644 index 000000000..27372487f --- /dev/null +++ b/bin/check-dependencies.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Note: This is a prototype for how we could add static code analysis to the CI. + +set -e + +if [[ $# -gt 0 ]]; then + # can override which environment by passing arg + BOARDS="$@" +else + BOARDS="rak4631 rak4631_eink t-echo pca10059_diy_eink pico rak11200 tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 nano-g1 station-g1 m5stack-core m5stack-coreink tbeam-s3-core" +fi + +echo "BOARDS:${BOARDS}" + +CHECK="" +for BOARD in $BOARDS; do + CHECK="${CHECK} -e ${BOARD}" +done + +echo $CHECK + +pio pkg outdated -e $CHECK diff --git a/platformio.ini b/platformio.ini index 2929ce092..5c5b45793 100644 --- a/platformio.ini +++ b/platformio.ini @@ -47,11 +47,8 @@ monitor_speed = 115200 lib_deps = https://github.com/meshtastic/esp8266-oled-ssd1306.git#53580644255b48ebb7a737343c6b4e71c7e11cf2 ; ESP8266_SSD1306 mathertel/OneButton@^2.0.3 ; OneButton library for non-blocking button debounce - 1202 ; CRC32, explicitly needed because dependency is missing in the ble ota update lib - https://github.com/meshtastic/arduino-fsm.git - https://github.com/meshtastic/TinyGPSPlus.git - Wire ; explicitly needed here because the AXP202 library forgets to add it - SPI + https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 + https://github.com/meshtastic/TinyGPSPlus.git#2f0d0528d737000043e949f4c3bdfb623cf0b902 https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3 nanopb/Nanopb@^0.4.6 @@ -65,7 +62,7 @@ framework = arduino lib_deps = ${env.lib_deps} ; Portduino is using meshtastic fork for now - https://github.com/jgromes/RadioLib.git@5.4.0 + jgromes/RadioLib@^5.4.0 build_flags = ${env.build_flags} -Os # -DRADIOLIB_GODMODE @@ -74,7 +71,7 @@ build_src_filter = ${env.build_src_filter} - ; Common libs for communicating over TCP/IP networks such as MQTT [networking_base] lib_deps = - PubSubClient + knolleary/PubSubClient@^2.8 meshtastic/json11@^1.0.2 ; Common libs for environmental measurements in telemetry module @@ -83,7 +80,7 @@ lib_deps = lib_deps = adafruit/Adafruit BusIO@^1.11.4 adafruit/Adafruit Unified Sensor@^1.1.4 - adafruit/Adafruit BMP280 Library@^2.6.3 + adafruit/Adafruit BMP280 Library@^2.6.6 adafruit/Adafruit BME280 Library@^2.2.2 adafruit/Adafruit BME680 Library@^2.0.1 adafruit/Adafruit MCP9808 Library@^2.0.0 diff --git a/src/GPSStatus.h b/src/GPSStatus.h index 22f426d52..cde351818 100644 --- a/src/GPSStatus.h +++ b/src/GPSStatus.h @@ -25,21 +25,21 @@ class GPSStatus : public Status public: GPSStatus() { statusType = STATUS_TYPE_GPS; } - // proposed for deprecation - GPSStatus(bool hasLock, bool isConnected, int32_t latitude, int32_t longitude, int32_t altitude, uint32_t dop, - uint32_t heading, uint32_t numSatellites) - : Status() - { - this->hasLock = hasLock; - this->isConnected = isConnected; + // // proposed for deprecation + // GPSStatus(bool hasLock, bool isConnected, int32_t latitude, int32_t longitude, int32_t altitude, uint32_t dop, + // uint32_t heading, uint32_t numSatellites) + // : Status() + // { + // this->hasLock = hasLock; + // this->isConnected = isConnected; - this->p.latitude_i = latitude; - this->p.longitude_i = longitude; - this->p.altitude = altitude; - this->p.PDOP = dop; - this->p.ground_track = heading; - this->p.sats_in_view = numSatellites; - } + // this->p.latitude_i = latitude; + // this->p.longitude_i = longitude; + // this->p.altitude = altitude; + // this->p.PDOP = dop; + // this->p.ground_track = heading; + // this->p.sats_in_view = numSatellites; + // } // preferred method GPSStatus(bool hasLock, bool isConnected, const Position &pos) : Status() @@ -114,6 +114,7 @@ class GPSStatus : public Status newStatus->p.latitude_i != p.latitude_i || newStatus->p.longitude_i != p.longitude_i || newStatus->p.altitude != p.altitude || newStatus->p.altitude_hae != p.altitude_hae || newStatus->p.PDOP != p.PDOP || newStatus->p.ground_track != p.ground_track || + newStatus->p.ground_speed != p.ground_speed || newStatus->p.sats_in_view != p.sats_in_view); } @@ -136,9 +137,9 @@ class GPSStatus : public Status if (isDirty) { if (hasLock) { // In debug logs, identify position by @timestamp:stage (stage 3 = notify) - DEBUG_MSG("New GPS pos@%x:3 lat=%f, lon=%f, alt=%d, pdop=%.2f, track=%.2f, sats=%d\n", p.timestamp, + DEBUG_MSG("New GPS pos@%x:3 lat=%f, lon=%f, alt=%d, pdop=%.2f, track=%.2f, speed=%.2f, sats=%d\n", p.timestamp, p.latitude_i * 1e-7, p.longitude_i * 1e-7, p.altitude, p.PDOP * 1e-2, p.ground_track * 1e-5, - p.sats_in_view); + p.ground_speed * 1e-2, p.sats_in_view); } else DEBUG_MSG("No GPS lock\n"); onNewStatus.notifyObservers(this); diff --git a/src/gps/NMEAGPS.cpp b/src/gps/NMEAGPS.cpp index 64db31f5b..380aa6419 100644 --- a/src/gps/NMEAGPS.cpp +++ b/src/gps/NMEAGPS.cpp @@ -223,13 +223,10 @@ bool NMEAGPS::lookForLocation() } } -/* - // REDUNDANT? - // expect gps pos lat=37.520825, lon=-122.309162, alt=158 - DEBUG_MSG("new NMEA GPS pos lat=%f, lon=%f, alt=%d, dop=%g, heading=%f\n", - latitude * 1e-7, longitude * 1e-7, altitude, dop * 1e-2, - heading * 1e-5); -*/ + if (reader.speed.isUpdated() && reader.speed.isValid()) { + p.ground_speed = reader.speed.kmph(); + } + return true; } diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index da32af9f3..1a6ad856d 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -354,7 +354,6 @@ void RadioInterface::applyModemConfig() // Set up default configuration // No Sync Words in LORA mode Config_LoRaConfig &loraConfig = config.lora; - auto channelSettings = channels.getPrimary(); if (loraConfig.spread_factor == 0) { switch (loraConfig.modem_preset) { case Config_LoRaConfig_ModemPreset_SHORT_FAST: diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 4045e000c..572d7063b 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -58,6 +58,8 @@ MeshPacket *PositionModule::allocReply() NodeInfo *node = service.refreshMyNodeInfo(); // should guarantee there is now a position assert(node->has_position); + node->position.seq_number++; + // configuration of POSITION packet // consider making this a function argument? uint32_t pos_flags = config.position.position_flags; @@ -97,6 +99,12 @@ MeshPacket *PositionModule::allocReply() if (pos_flags & Config_PositionConfig_PositionFlags_SEQ_NO) p.seq_number = node->position.seq_number; + if (pos_flags & Config_PositionConfig_PositionFlags_HEADING) + p.ground_track = node->position.ground_track; + + if (pos_flags & Config_PositionConfig_PositionFlags_SPEED) + p.ground_speed = node->position.ground_speed; + // Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other // nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless // devices can get time. diff --git a/variants/Dongle_nRF52840-pca10059-v1/platformio.ini b/variants/Dongle_nRF52840-pca10059-v1/platformio.ini index 10f31c5e5..027ab41d5 100644 --- a/variants/Dongle_nRF52840-pca10059-v1/platformio.ini +++ b/variants/Dongle_nRF52840-pca10059-v1/platformio.ini @@ -5,5 +5,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-pca10059-v1> lib_deps = ${nrf52840_base.lib_deps} - https://github.com/ZinggJM/GxEPD2.git + zinggjm/GxEPD2@^1.4.9 debug_tool = jlink diff --git a/variants/lora_relay_v1/platformio.ini b/variants/lora_relay_v1/platformio.ini index 312108979..9a73fda7c 100644 --- a/variants/lora_relay_v1/platformio.ini +++ b/variants/lora_relay_v1/platformio.ini @@ -17,5 +17,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1> lib_deps = ${nrf52840_base.lib_deps} - SparkFun BQ27441 LiPo Fuel Gauge Arduino Library - TFT_eSPI \ No newline at end of file + sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 + bodmer/TFT_eSPI@^2.4.76 \ No newline at end of file diff --git a/variants/lora_relay_v2/platformio.ini b/variants/lora_relay_v2/platformio.ini index f35b14c02..93756c6dd 100644 --- a/variants/lora_relay_v2/platformio.ini +++ b/variants/lora_relay_v2/platformio.ini @@ -19,5 +19,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v2 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v2> lib_deps = ${nrf52840_base.lib_deps} - SparkFun BQ27441 LiPo Fuel Gauge Arduino Library - TFT_eSPI + sparkfun/SparkFun BQ27441 LiPo Fuel Gauge Arduino Library@^1.1.0 + bodmer/TFT_eSPI@^2.4.76 diff --git a/variants/m5stack_core/platformio.ini b/variants/m5stack_core/platformio.ini index c9227fed9..dd9bd0f71 100644 --- a/variants/m5stack_core/platformio.ini +++ b/variants/m5stack_core/platformio.ini @@ -27,4 +27,4 @@ lib_ignore = m5stack-core lib_deps = ${esp32_base.lib_deps} - bodmer/TFT_eSPI@^2.4.61 \ No newline at end of file + bodmer/TFT_eSPI@^2.4.76 \ No newline at end of file diff --git a/variants/m5stack_coreink/platformio.ini b/variants/m5stack_coreink/platformio.ini index a6a35d80e..9b41675e4 100644 --- a/variants/m5stack_coreink/platformio.ini +++ b/variants/m5stack_coreink/platformio.ini @@ -11,7 +11,7 @@ build_flags = -DM5STACK lib_deps = ${esp32_base.lib_deps} - zinggjm/GxEPD2@^1.4.5 + zinggjm/GxEPD2@^1.4.9 lewisxhe/PCF8563_Library@^0.0.1 board_build.f_cpu = 240000000L upload_protocol = esptool diff --git a/variants/ppr/platformio.ini b/variants/ppr/platformio.ini index d7c985dbf..cb7b21de4 100644 --- a/variants/ppr/platformio.ini +++ b/variants/ppr/platformio.ini @@ -4,4 +4,4 @@ extends = nrf52_base board = ppr lib_deps = ${arduino_base.lib_deps} - UC1701 \ No newline at end of file + industruino/UC1701@^1.1.0 \ No newline at end of file diff --git a/variants/rak4631_epaper/platformio.ini b/variants/rak4631_epaper/platformio.ini index 048860cef..fd266c07f 100644 --- a/variants/rak4631_epaper/platformio.ini +++ b/variants/rak4631_epaper/platformio.ini @@ -6,7 +6,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper> lib_deps = ${nrf52840_base.lib_deps} - https://github.com/ZinggJM/GxEPD2.git + zinggjm/GxEPD2@^1.4.9 melopero/Melopero RV3028@^1.1.0 debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) diff --git a/variants/t-echo/platformio.ini b/variants/t-echo/platformio.ini index 73b2ae059..42b03b688 100644 --- a/variants/t-echo/platformio.ini +++ b/variants/t-echo/platformio.ini @@ -12,7 +12,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo build_src_filter = ${nrf52_base.build_src_filter} +<../variants/t-echo> lib_deps = ${nrf52840_base.lib_deps} - https://github.com/meshtastic/GxEPD2 - adafruit/Adafruit BusIO + https://github.com/meshtastic/GxEPD2#afce87a97dda1ac31d8a28dc8fa7c6f55dc96a61 + adafruit/Adafruit BusIO@^1.13.2 lewisxhe/PCF8563_Library@^0.0.1 ;upload_protocol = fs