mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 08:17:26 +00:00
Compare commits
23 Commits
1ab93e04d5
...
1b02c86852
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1b02c86852 | ||
![]() |
3d5eb34c5c | ||
![]() |
3a9a4bbb92 | ||
![]() |
6eba2789d0 | ||
![]() |
9b4c260a92 | ||
![]() |
667b4ef0f2 | ||
![]() |
db76561930 | ||
![]() |
7bad070891 | ||
![]() |
6365fcfdc6 | ||
![]() |
ab2cbada75 | ||
![]() |
875b8641d3 | ||
![]() |
67c2c516a0 | ||
![]() |
623203ca3b | ||
![]() |
f28f0a9d90 | ||
![]() |
893efe4f11 | ||
![]() |
2c2213ef9b | ||
![]() |
439c1dec08 | ||
![]() |
aa184e6d8b | ||
![]() |
2eea412f1c | ||
![]() |
b0a5a26f58 | ||
![]() |
a815a770b4 | ||
![]() |
286f3c6458 | ||
![]() |
b506f6dcb0 |
3
.github/workflows/build_esp32.yml
vendored
3
.github/workflows/build_esp32.yml
vendored
@ -7,6 +7,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-esp32:
|
build-esp32:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -24,6 +26,7 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware.bin
|
ota-firmware-source: firmware.bin
|
||||||
ota-firmware-target: release/bleota.bin
|
ota-firmware-target: release/bleota.bin
|
||||||
|
2
.github/workflows/build_esp32_c3.yml
vendored
2
.github/workflows/build_esp32_c3.yml
vendored
@ -26,10 +26,12 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware-c3.bin
|
ota-firmware-source: firmware-c3.bin
|
||||||
ota-firmware-target: release/bleota-c3.bin
|
ota-firmware-target: release/bleota-c3.bin
|
||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
arch: esp32c3
|
arch: esp32c3
|
||||||
|
1
.github/workflows/build_esp32_c6.yml
vendored
1
.github/workflows/build_esp32_c6.yml
vendored
@ -33,4 +33,5 @@ jobs:
|
|||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
arch: esp32c6
|
arch: esp32c6
|
||||||
|
3
.github/workflows/build_esp32_s3.yml
vendored
3
.github/workflows/build_esp32_s3.yml
vendored
@ -7,6 +7,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-esp32-s3:
|
build-esp32-s3:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -24,6 +26,7 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware-s3.bin
|
ota-firmware-source: firmware-s3.bin
|
||||||
ota-firmware-target: release/bleota-s3.bin
|
ota-firmware-target: release/bleota-s3.bin
|
||||||
|
4
.github/workflows/build_raspbian_armv7l.yml
vendored
4
.github/workflows/build_raspbian_armv7l.yml
vendored
@ -13,8 +13,8 @@ jobs:
|
|||||||
- name: Install libbluetooth
|
- name: Install libbluetooth
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y --fix-missing
|
sudo apt-get update -y --fix-missing
|
||||||
apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
4
.github/workflows/package_amd64.yml
vendored
4
.github/workflows/package_amd64.yml
vendored
@ -54,6 +54,10 @@ jobs:
|
|||||||
mkdir -p .debpkg/etc/meshtasticd/available.d
|
mkdir -p .debpkg/etc/meshtasticd/available.d
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
mkdir -p .debpkg/usr/lib/systemd/system/
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
||||||
|
shopt -s dotglob nullglob
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
||||||
cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd
|
cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
||||||
|
4
.github/workflows/package_raspbian.yml
vendored
4
.github/workflows/package_raspbian.yml
vendored
@ -54,6 +54,10 @@ jobs:
|
|||||||
mkdir -p .debpkg/etc/meshtasticd/available.d
|
mkdir -p .debpkg/etc/meshtasticd/available.d
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
mkdir -p .debpkg/usr/lib/systemd/system/
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
||||||
|
shopt -s dotglob nullglob
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
||||||
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
|
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
||||||
|
@ -54,6 +54,10 @@ jobs:
|
|||||||
mkdir -p .debpkg/etc/meshtasticd/available.d
|
mkdir -p .debpkg/etc/meshtasticd/available.d
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
mkdir -p .debpkg/usr/lib/systemd/system/
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
||||||
|
shopt -s dotglob nullglob
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
|
||||||
|
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
||||||
cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd
|
cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
||||||
|
@ -14,6 +14,7 @@ build_flags =
|
|||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
-Isrc/platform/nrf52
|
-Isrc/platform/nrf52
|
||||||
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
|
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
|
||||||
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
||||||
|
@ -32,6 +32,7 @@ build_flags =
|
|||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
-DRADIOLIB_EEPROM_UNSUPPORTED
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
-DPORTDUINO_LINUX_HARDWARE
|
||||||
|
-lstdc++fs
|
||||||
-lbluetooth
|
-lbluetooth
|
||||||
-lgpiod
|
-lgpiod
|
||||||
-lyaml-cpp
|
-lyaml-cpp
|
||||||
|
176
platformio.ini
176
platformio.ini
@ -29,7 +29,7 @@ default_envs = tbeam
|
|||||||
;default_envs = rak4631
|
;default_envs = rak4631
|
||||||
;default_envs = rak4631_eth_gw
|
;default_envs = rak4631_eth_gw
|
||||||
;default_envs = rak2560
|
;default_envs = rak2560
|
||||||
;default_envs = rak10701
|
;default_envs = rak_wismeshtap
|
||||||
;default_envs = wio-e5
|
;default_envs = wio-e5
|
||||||
;default_envs = radiomaster_900_bandit_nano
|
;default_envs = radiomaster_900_bandit_nano
|
||||||
;default_envs = radiomaster_900_bandit_micro
|
;default_envs = radiomaster_900_bandit_micro
|
||||||
@ -39,128 +39,126 @@ default_envs = tbeam
|
|||||||
;default_envs = heltec_vision_master_e213
|
;default_envs = heltec_vision_master_e213
|
||||||
;default_envs = heltec_vision_master_e290
|
;default_envs = heltec_vision_master_e290
|
||||||
;default_envs = heltec_mesh_node_t114
|
;default_envs = heltec_mesh_node_t114
|
||||||
|
|
||||||
extra_configs =
|
extra_configs =
|
||||||
arch/*/*.ini
|
arch/*/*.ini
|
||||||
variants/*/platformio.ini
|
variants/*/platformio.ini
|
||||||
|
description = Meshtastic
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
test_build_src = true
|
test_build_src = true
|
||||||
extra_scripts = bin/platformio-custom.py
|
extra_scripts = bin/platformio-custom.py
|
||||||
|
|
||||||
; note: we add src to our include search path so that lmic_project_config can override
|
; note: we add src to our include search path so that lmic_project_config can override
|
||||||
; note: TINYGPS_OPTION_NO_CUSTOM_FIELDS is VERY important. We don't use custom fields and somewhere in that pile
|
; note: TINYGPS_OPTION_NO_CUSTOM_FIELDS is VERY important. We don't use custom fields and somewhere in that pile
|
||||||
; of code is a heap corruption bug!
|
; of code is a heap corruption bug!
|
||||||
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
|
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
|
||||||
; The Radiolib stuff will speed up building considerably. Exclud all the stuff we dont need.
|
; The Radiolib stuff will speed up building considerably. Exclud all the stuff we dont need.
|
||||||
build_flags = -Wno-missing-field-initializers
|
build_flags = -Wno-missing-field-initializers
|
||||||
-Wno-format
|
|
||||||
-Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,.pio/build/output.map
|
-Wno-format
|
||||||
-DUSE_THREAD_NAMES
|
-Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,.pio/build/output.map
|
||||||
-DTINYGPS_OPTION_NO_CUSTOM_FIELDS
|
-DUSE_THREAD_NAMES
|
||||||
-DPB_ENABLE_MALLOC=1
|
-DTINYGPS_OPTION_NO_CUSTOM_FIELDS
|
||||||
-DRADIOLIB_EXCLUDE_CC1101=1
|
-DPB_ENABLE_MALLOC=1
|
||||||
-DRADIOLIB_EXCLUDE_NRF24=1
|
-DRADIOLIB_EXCLUDE_CC1101=1
|
||||||
-DRADIOLIB_EXCLUDE_RF69=1
|
-DRADIOLIB_EXCLUDE_NRF24=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1231=1
|
-DRADIOLIB_EXCLUDE_RF69=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1233=1
|
-DRADIOLIB_EXCLUDE_SX1231=1
|
||||||
-DRADIOLIB_EXCLUDE_SI443X=1
|
-DRADIOLIB_EXCLUDE_SX1233=1
|
||||||
-DRADIOLIB_EXCLUDE_RFM2X=1
|
-DRADIOLIB_EXCLUDE_SI443X=1
|
||||||
-DRADIOLIB_EXCLUDE_AFSK=1
|
-DRADIOLIB_EXCLUDE_RFM2X=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL=1
|
-DRADIOLIB_EXCLUDE_AFSK=1
|
||||||
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
-DRADIOLIB_EXCLUDE_BELL=1
|
||||||
-DRADIOLIB_EXCLUDE_MORSE=1
|
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
||||||
-DRADIOLIB_EXCLUDE_RTTY=1
|
-DRADIOLIB_EXCLUDE_MORSE=1
|
||||||
-DRADIOLIB_EXCLUDE_SSTV=1
|
-DRADIOLIB_EXCLUDE_RTTY=1
|
||||||
-DRADIOLIB_EXCLUDE_AX25=1
|
-DRADIOLIB_EXCLUDE_SSTV=1
|
||||||
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
-DRADIOLIB_EXCLUDE_AX25=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL=1
|
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
||||||
-DRADIOLIB_EXCLUDE_PAGER=1
|
-DRADIOLIB_EXCLUDE_BELL=1
|
||||||
-DRADIOLIB_EXCLUDE_FSK4=1
|
-DRADIOLIB_EXCLUDE_PAGER=1
|
||||||
-DRADIOLIB_EXCLUDE_APRS=1
|
-DRADIOLIB_EXCLUDE_FSK4=1
|
||||||
-DRADIOLIB_EXCLUDE_LORAWAN=1
|
-DRADIOLIB_EXCLUDE_APRS=1
|
||||||
-DMESHTASTIC_EXCLUDE_DROPZONE=1
|
-DRADIOLIB_EXCLUDE_LORAWAN=1
|
||||||
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1
|
-DMESHTASTIC_EXCLUDE_DROPZONE=1
|
||||||
#-DBUILD_EPOCH=$UNIX_TIME
|
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1
|
||||||
;-D OLED_PL
|
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
|
||||||
|
#-DBUILD_EPOCH=$UNIX_TIME
|
||||||
|
;-D OLED_PL
|
||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_filters = direct
|
monitor_filters = direct
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
jgromes/RadioLib@~7.0.2
|
jgromes/RadioLib@7.0.2
|
||||||
https://github.com/meshtastic/esp8266-oled-ssd1306.git#e16cee124fe26490cb14880c679321ad8ac89c95 ; ESP8266_SSD1306
|
https://github.com/meshtastic/esp8266-oled-ssd1306.git#e16cee124fe26490cb14880c679321ad8ac89c95
|
||||||
mathertel/OneButton@~2.6.1 ; OneButton library for non-blocking button debounce
|
mathertel/OneButton@2.6.1
|
||||||
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159
|
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159
|
||||||
https://github.com/meshtastic/TinyGPSPlus.git#71a82db35f3b973440044c476d4bcdc673b104f4
|
https://github.com/meshtastic/TinyGPSPlus.git#71a82db35f3b973440044c476d4bcdc673b104f4
|
||||||
https://github.com/meshtastic/ArduinoThread.git#1ae8778c85d0a2a729f989e0b1e7d7c4dc84eef0
|
https://github.com/meshtastic/ArduinoThread.git#1ae8778c85d0a2a729f989e0b1e7d7c4dc84eef0
|
||||||
nanopb/Nanopb@^0.4.9
|
nanopb/Nanopb@0.4.9
|
||||||
erriez/ErriezCRC32@^1.0.1
|
erriez/ErriezCRC32@1.0.1
|
||||||
|
|
||||||
; Used for the code analysis in PIO Home / Inspect
|
; Used for the code analysis in PIO Home / Inspect
|
||||||
check_tool = cppcheck
|
check_tool = cppcheck
|
||||||
check_skip_packages = yes
|
check_skip_packages = yes
|
||||||
check_flags =
|
check_flags =
|
||||||
-DAPP_VERSION=1.0.0
|
-DAPP_VERSION=1.0.0
|
||||||
--suppressions-list=suppressions.txt
|
--suppressions-list=suppressions.txt
|
||||||
--inline-suppr
|
--inline-suppr
|
||||||
|
|
||||||
; Common settings for conventional (non Portduino) Arduino targets
|
; Common settings for conventional (non Portduino) Arduino targets
|
||||||
[arduino_base]
|
[arduino_base]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
end2endzone/NonBlockingRTTTL@^1.3.0
|
end2endzone/NonBlockingRTTTL@1.3.0
|
||||||
https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#5cf62b36c6f30bc72a07bdb2c11fc9a22d1e31da
|
https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#5cf62b36c6f30bc72a07bdb2c11fc9a22d1e31da
|
||||||
|
|
||||||
build_flags = ${env.build_flags} -Os
|
build_flags = ${env.build_flags} -Os
|
||||||
build_src_filter = ${env.build_src_filter} -<platform/portduino/>
|
build_src_filter = ${env.build_src_filter} -<platform/portduino/>
|
||||||
|
|
||||||
; Common libs for communicating over TCP/IP networks such as MQTT
|
; Common libs for communicating over TCP/IP networks such as MQTT
|
||||||
[networking_base]
|
[networking_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
knolleary/PubSubClient@^2.8
|
knolleary/PubSubClient@2.8
|
||||||
arduino-libraries/NTPClient@^3.1.0
|
arduino-libraries/NTPClient@3.1.0
|
||||||
arcao/Syslog@^2.0.0
|
arcao/Syslog@2.0.0
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
; (not included in native / portduino)
|
; (not included in native / portduino)
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/Adafruit BusIO@^1.16.1
|
adafruit/Adafruit BusIO@1.16.2
|
||||||
adafruit/Adafruit Unified Sensor@^1.1.11
|
adafruit/Adafruit Unified Sensor@1.1.14
|
||||||
adafruit/Adafruit BMP280 Library@^2.6.8
|
adafruit/Adafruit BMP280 Library@2.6.8
|
||||||
adafruit/Adafruit BMP085 Library@^1.2.4
|
adafruit/Adafruit BMP085 Library@1.2.4
|
||||||
adafruit/Adafruit BME280 Library@^2.2.2
|
adafruit/Adafruit BME280 Library@2.2.4
|
||||||
adafruit/Adafruit BMP3XX Library@^2.1.5
|
adafruit/Adafruit BMP3XX Library@2.1.5
|
||||||
adafruit/Adafruit MCP9808 Library@^2.0.0
|
adafruit/Adafruit MCP9808 Library@2.0.2
|
||||||
adafruit/Adafruit INA260 Library@^1.5.0
|
adafruit/Adafruit INA260 Library@1.5.2
|
||||||
adafruit/Adafruit INA219@^1.2.0
|
adafruit/Adafruit INA219@1.2.3
|
||||||
adafruit/Adafruit MAX1704X@^1.0.3
|
adafruit/Adafruit MAX1704X@1.0.3
|
||||||
adafruit/Adafruit SHTC3 Library@^1.0.0
|
adafruit/Adafruit SHTC3 Library@1.0.1
|
||||||
adafruit/Adafruit LPS2X@^2.0.4
|
adafruit/Adafruit LPS2X@2.0.6
|
||||||
adafruit/Adafruit SHT31 Library@^2.2.2
|
adafruit/Adafruit SHT31 Library@2.2.2
|
||||||
adafruit/Adafruit PM25 AQI Sensor@^1.1.1
|
adafruit/Adafruit PM25 AQI Sensor@1.1.1
|
||||||
adafruit/Adafruit MPU6050@^2.2.4
|
adafruit/Adafruit MPU6050@2.2.6
|
||||||
adafruit/Adafruit LIS3DH@^1.3.0
|
adafruit/Adafruit LIS3DH@1.3.0
|
||||||
adafruit/Adafruit AHTX0@^2.0.5
|
adafruit/Adafruit AHTX0@2.0.5
|
||||||
adafruit/Adafruit LSM6DS@^4.7.2
|
adafruit/Adafruit LSM6DS@4.7.3
|
||||||
adafruit/Adafruit VEML7700 Library@^2.1.6
|
adafruit/Adafruit VEML7700 Library@2.1.6
|
||||||
adafruit/Adafruit SHT4x Library@^1.0.4
|
adafruit/Adafruit SHT4x Library@1.0.5
|
||||||
adafruit/Adafruit TSL2591 Library@^1.4.5
|
adafruit/Adafruit TSL2591 Library@1.4.5
|
||||||
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@^1.0.5
|
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6
|
||||||
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@^1.2.13
|
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.2.13
|
||||||
ClosedCube OPT3001@^1.1.2
|
ClosedCube OPT3001@1.1.2
|
||||||
emotibit/EmotiBit MLX90632@^1.0.8
|
emotibit/EmotiBit MLX90632@1.0.8
|
||||||
dfrobot/DFRobot_RTU@^1.0.3
|
dfrobot/DFRobot_RTU@1.0.3
|
||||||
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@^1.1.2
|
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2
|
||||||
adafruit/Adafruit MLX90614 Library@^2.1.5
|
adafruit/Adafruit MLX90614 Library@2.1.5
|
||||||
|
|
||||||
https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.7.2502
|
https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.7.2502
|
||||||
boschsensortec/BME68x Sensor Library@^1.1.40407
|
boschsensortec/BME68x Sensor Library@1.1.40407
|
||||||
https://github.com/KodinLanewave/INA3221@^1.0.1
|
https://github.com/KodinLanewave/INA3221@1.0.1
|
||||||
lewisxhe/SensorLib@0.2.0
|
lewisxhe/SensorLib@0.2.0
|
||||||
mprograms/QMC5883LCompass@^1.2.0
|
mprograms/QMC5883LCompass@1.2.3
|
||||||
|
|
||||||
https://github.com/meshtastic/DFRobot_LarkWeatherStation#4de3a9cadef0f6a5220a8a906cf9775b02b0040d
|
https://github.com/meshtastic/DFRobot_LarkWeatherStation#4de3a9cadef0f6a5220a8a906cf9775b02b0040d
|
||||||
https://github.com/gjelsoe/STK8xxx-Accelerometer.git#v0.1.1
|
https://github.com/gjelsoe/STK8xxx-Accelerometer.git#v0.1.1
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 06cf134e2b3d035c3ca6cbbb90b4c017d4715398
|
Subproject commit 04f21f5c7238b8e02f794d9282c4786752634b3c
|
@ -153,8 +153,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// ACCELEROMETER
|
// ACCELEROMETER
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
#define MPU6050_ADDR 0x68
|
#define MPU6050_ADDR 0x68
|
||||||
#define STK8BXX_ADR 0x18
|
#define STK8BXX_ADDR 0x18
|
||||||
#define LIS3DH_ADR 0x18
|
#define LIS3DH_ADDR 0x18
|
||||||
|
#define LIS3DH_ADDR_ALT 0x19
|
||||||
#define BMA423_ADDR 0x19
|
#define BMA423_ADDR 0x19
|
||||||
#define LSM6DS3_ADDR 0x6A
|
#define LSM6DS3_ADDR 0x6A
|
||||||
#define BMX160_ADDR 0x69
|
#define BMX160_ADDR 0x69
|
||||||
|
@ -409,7 +409,17 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
|||||||
#else
|
#else
|
||||||
SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031 air quality sensor found")
|
SCAN_SIMPLE_CASE(PMSA0031_ADDR, PMSA0031, "PMSA0031 air quality sensor found")
|
||||||
#endif
|
#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(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(TCA9535_ADDR, TCA9535, "TCA9535 I2C expander found");
|
||||||
SCAN_SIMPLE_CASE(TCA9555_ADDR, TCA9555, "TCA9555 I2C expander found");
|
SCAN_SIMPLE_CASE(TCA9555_ADDR, TCA9555, "TCA9555 I2C expander found");
|
||||||
|
@ -794,7 +794,7 @@ void GPS::writePinEN(bool on)
|
|||||||
// Write and log
|
// Write and log
|
||||||
enablePin->set(on);
|
enablePin->set(on);
|
||||||
#ifdef GPS_DEBUG
|
#ifdef GPS_DEBUG
|
||||||
LOG_DEBUG("Pin EN %s", val == HIGH ? "HI" : "LOW");
|
LOG_DEBUG("Pin EN %s", on == HIGH ? "HI" : "LOW");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#include "TouchScreenBase.h"
|
#include "TouchScreenBase.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
#if defined(RAK14014) && !defined(MESHTASTIC_EXCLUDE_CANNEDMESSAGES)
|
||||||
|
#include "modules/CannedMessageModule.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TIME_LONG_PRESS
|
#ifndef TIME_LONG_PRESS
|
||||||
#define TIME_LONG_PRESS 400
|
#define TIME_LONG_PRESS 400
|
||||||
#endif
|
#endif
|
||||||
@ -102,12 +106,30 @@ int32_t TouchScreenBase::runOnce()
|
|||||||
}
|
}
|
||||||
_touchedOld = touched;
|
_touchedOld = touched;
|
||||||
|
|
||||||
|
#if defined RAK14014
|
||||||
|
// Speed up the processing speed of the keyboard in virtual keyboard mode
|
||||||
|
auto state = cannedMessageModule->getRunState();
|
||||||
|
if (state == CANNED_MESSAGE_RUN_STATE_FREETEXT) {
|
||||||
|
if (_tapped) {
|
||||||
|
_tapped = false;
|
||||||
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
|
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||||
|
_tapped = false;
|
||||||
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
|
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
// fire TAP event when no 2nd tap occured within time
|
// fire TAP event when no 2nd tap occured within time
|
||||||
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||||
_tapped = false;
|
_tapped = false;
|
||||||
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
LOG_DEBUG("action TAP(%d/%d)", _last_x, _last_y);
|
LOG_DEBUG("action TAP(%d/%d)", _last_x, _last_y);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// fire LONG_PRESS event without the need for release
|
// fire LONG_PRESS event without the need for release
|
||||||
if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {
|
if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {
|
||||||
|
25
src/main.cpp
25
src/main.cpp
@ -1161,6 +1161,31 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
|||||||
deviceMetadata.hw_model = HW_VENDOR;
|
deviceMetadata.hw_model = HW_VENDOR;
|
||||||
deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled;
|
deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled;
|
||||||
deviceMetadata.excluded_modules = meshtastic_ExcludedModules_EXCLUDED_NONE;
|
deviceMetadata.excluded_modules = meshtastic_ExcludedModules_EXCLUDED_NONE;
|
||||||
|
#if MESHTASTIC_EXCLUDE_REMOTEHARDWARE
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_REMOTEHARDWARE_CONFIG;
|
||||||
|
#endif
|
||||||
|
#if MESHTASTIC_EXCLUDE_AUDIO
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG;
|
||||||
|
#endif
|
||||||
|
#if !HAS_SCREEN || NO_EXT_GPIO
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_CANNEDMSG_CONFIG | meshtastic_ExcludedModules_EXTNOTIF_CONFIG;
|
||||||
|
#endif
|
||||||
|
// Only edge case here is if we apply this a device with built in Accelerometer and want to detect interrupts
|
||||||
|
// We'll have to macro guard against those targets potentially
|
||||||
|
#if NO_EXT_GPIO
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG;
|
||||||
|
#endif
|
||||||
|
// If we don't have any GPIO and we don't have GPS, no purpose in having serial config
|
||||||
|
#if NO_EXT_GPIO && NO_GPS
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG;
|
||||||
|
#endif
|
||||||
|
#ifndef ARCH_ESP32
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_PAXCOUNTER_CONFIG;
|
||||||
|
#endif
|
||||||
|
#if !defined(HAS_NCP5623) && !defined(RGBLED_RED) && !defined(HAS_NEOPIXEL) && !defined(UNPHONE) && !RAK_4631
|
||||||
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !(MESHTASTIC_EXCLUDE_PKI)
|
#if !(MESHTASTIC_EXCLUDE_PKI)
|
||||||
deviceMetadata.hasPKC = true;
|
deviceMetadata.hasPKC = true;
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define default_node_info_broadcast_secs 3 * 60 * 60
|
#define default_node_info_broadcast_secs 3 * 60 * 60
|
||||||
#define default_neighbor_info_broadcast_secs 6 * 60 * 60
|
#define default_neighbor_info_broadcast_secs 6 * 60 * 60
|
||||||
#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour
|
#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour
|
||||||
#define min_neighbor_info_broadcast_secs 2 * 60 * 60
|
#define min_neighbor_info_broadcast_secs 4 * 60 * 60
|
||||||
|
|
||||||
#define default_mqtt_address "mqtt.meshtastic.org"
|
#define default_mqtt_address "mqtt.meshtastic.org"
|
||||||
#define default_mqtt_username "meshdev"
|
#define default_mqtt_username "meshdev"
|
||||||
|
@ -231,6 +231,9 @@ NodeDB::NodeDB()
|
|||||||
moduleConfig.telemetry.health_update_interval = Default::getConfiguredOrMinimumValue(
|
moduleConfig.telemetry.health_update_interval = Default::getConfiguredOrMinimumValue(
|
||||||
moduleConfig.telemetry.health_update_interval, min_default_telemetry_interval_secs);
|
moduleConfig.telemetry.health_update_interval, min_default_telemetry_interval_secs);
|
||||||
}
|
}
|
||||||
|
// Ensure that the neighbor info update interval is coerced to the minimum
|
||||||
|
moduleConfig.neighbor_info.update_interval =
|
||||||
|
Default::getConfiguredOrMinimumValue(moduleConfig.neighbor_info.update_interval, min_neighbor_info_broadcast_secs);
|
||||||
|
|
||||||
if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate)))
|
if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate)))
|
||||||
saveWhat |= SEGMENT_DEVICESTATE;
|
saveWhat |= SEGMENT_DEVICESTATE;
|
||||||
@ -473,7 +476,7 @@ void NodeDB::initConfigIntervals()
|
|||||||
|
|
||||||
config.display.screen_on_secs = default_screen_on_secs;
|
config.display.screen_on_secs = default_screen_on_secs;
|
||||||
|
|
||||||
#if defined(T_WATCH_S3) || defined(T_DECK)
|
#if defined(T_WATCH_S3) || defined(T_DECK) || defined(RAK14014)
|
||||||
config.power.is_power_saving = true;
|
config.power.is_power_saving = true;
|
||||||
config.display.screen_on_secs = 30;
|
config.display.screen_on_secs = 30;
|
||||||
config.power.wait_bluetooth_secs = 30;
|
config.power.wait_bluetooth_secs = 30;
|
||||||
@ -1219,9 +1222,7 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
|
|||||||
|
|
||||||
if (!lite) {
|
if (!lite) {
|
||||||
if (isFull()) {
|
if (isFull()) {
|
||||||
if (screen)
|
LOG_INFO("Node database full with %i nodes and %i bytes free. Erasing oldest entry", numMeshNodes,
|
||||||
screen->print("Warn: node database full!\nErasing oldest entry\n");
|
|
||||||
LOG_WARN("Node database full with %i nodes and %i bytes free! Erasing oldest entry", numMeshNodes,
|
|
||||||
memGet.getFreeHeap());
|
memGet.getFreeHeap());
|
||||||
// look for oldest node and erase it
|
// look for oldest node and erase it
|
||||||
uint32_t oldest = UINT32_MAX;
|
uint32_t oldest = UINT32_MAX;
|
||||||
|
@ -218,62 +218,70 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case STATE_SEND_METADATA:
|
case STATE_SEND_METADATA:
|
||||||
LOG_DEBUG("Send Metadata");
|
LOG_DEBUG("Send device metadata");
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag;
|
||||||
fromRadioScratch.metadata = getDeviceMetadata();
|
fromRadioScratch.metadata = getDeviceMetadata();
|
||||||
state = STATE_SEND_CHANNELS;
|
state = STATE_SEND_CHANNELS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_CHANNELS:
|
case STATE_SEND_CHANNELS:
|
||||||
LOG_DEBUG("Send Channels");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag;
|
||||||
fromRadioScratch.channel = channels.getByIndex(config_state);
|
fromRadioScratch.channel = channels.getByIndex(config_state);
|
||||||
config_state++;
|
config_state++;
|
||||||
// Advance when we have sent all of our Channels
|
// Advance when we have sent all of our Channels
|
||||||
if (config_state >= MAX_NUM_CHANNELS) {
|
if (config_state >= MAX_NUM_CHANNELS) {
|
||||||
|
LOG_DEBUG("Send channels %d", config_state);
|
||||||
state = STATE_SEND_CONFIG;
|
state = STATE_SEND_CONFIG;
|
||||||
config_state = _meshtastic_AdminMessage_ConfigType_MIN + 1;
|
config_state = _meshtastic_AdminMessage_ConfigType_MIN + 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_CONFIG:
|
case STATE_SEND_CONFIG:
|
||||||
LOG_DEBUG("Send Radio config");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;
|
||||||
switch (config_state) {
|
switch (config_state) {
|
||||||
case meshtastic_Config_device_tag:
|
case meshtastic_Config_device_tag:
|
||||||
|
LOG_DEBUG("Send config: device");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_tag;
|
||||||
fromRadioScratch.config.payload_variant.device = config.device;
|
fromRadioScratch.config.payload_variant.device = config.device;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_position_tag:
|
case meshtastic_Config_position_tag:
|
||||||
|
LOG_DEBUG("Send config: position");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_position_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_position_tag;
|
||||||
fromRadioScratch.config.payload_variant.position = config.position;
|
fromRadioScratch.config.payload_variant.position = config.position;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_power_tag:
|
case meshtastic_Config_power_tag:
|
||||||
|
LOG_DEBUG("Send config: power");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_power_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_power_tag;
|
||||||
fromRadioScratch.config.payload_variant.power = config.power;
|
fromRadioScratch.config.payload_variant.power = config.power;
|
||||||
fromRadioScratch.config.payload_variant.power.ls_secs = default_ls_secs;
|
fromRadioScratch.config.payload_variant.power.ls_secs = default_ls_secs;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_network_tag:
|
case meshtastic_Config_network_tag:
|
||||||
|
LOG_DEBUG("Send config: network");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_network_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_network_tag;
|
||||||
fromRadioScratch.config.payload_variant.network = config.network;
|
fromRadioScratch.config.payload_variant.network = config.network;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_display_tag:
|
case meshtastic_Config_display_tag:
|
||||||
|
LOG_DEBUG("Send config: display");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_display_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_display_tag;
|
||||||
fromRadioScratch.config.payload_variant.display = config.display;
|
fromRadioScratch.config.payload_variant.display = config.display;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_lora_tag:
|
case meshtastic_Config_lora_tag:
|
||||||
|
LOG_DEBUG("Send config: lora");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_lora_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_lora_tag;
|
||||||
fromRadioScratch.config.payload_variant.lora = config.lora;
|
fromRadioScratch.config.payload_variant.lora = config.lora;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_bluetooth_tag:
|
case meshtastic_Config_bluetooth_tag:
|
||||||
|
LOG_DEBUG("Send config: bluetooth");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;
|
||||||
fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;
|
fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_security_tag:
|
case meshtastic_Config_security_tag:
|
||||||
|
LOG_DEBUG("Send config: security");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
||||||
fromRadioScratch.config.payload_variant.security = config.security;
|
fromRadioScratch.config.payload_variant.security = config.security;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_sessionkey_tag:
|
case meshtastic_Config_sessionkey_tag:
|
||||||
|
LOG_DEBUG("Send config: sessionkey");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -292,58 +300,70 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_MODULECONFIG:
|
case STATE_SEND_MODULECONFIG:
|
||||||
LOG_DEBUG("Send Module Config");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_moduleConfig_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_moduleConfig_tag;
|
||||||
switch (config_state) {
|
switch (config_state) {
|
||||||
case meshtastic_ModuleConfig_mqtt_tag:
|
case meshtastic_ModuleConfig_mqtt_tag:
|
||||||
|
LOG_DEBUG("Send module config: mqtt");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.mqtt = moduleConfig.mqtt;
|
fromRadioScratch.moduleConfig.payload_variant.mqtt = moduleConfig.mqtt;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_serial_tag:
|
case meshtastic_ModuleConfig_serial_tag:
|
||||||
|
LOG_DEBUG("Send module config: serial");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_serial_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_serial_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.serial = moduleConfig.serial;
|
fromRadioScratch.moduleConfig.payload_variant.serial = moduleConfig.serial;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_external_notification_tag:
|
case meshtastic_ModuleConfig_external_notification_tag:
|
||||||
|
LOG_DEBUG("Send module config: ext notification");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.external_notification = moduleConfig.external_notification;
|
fromRadioScratch.moduleConfig.payload_variant.external_notification = moduleConfig.external_notification;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_store_forward_tag:
|
case meshtastic_ModuleConfig_store_forward_tag:
|
||||||
|
LOG_DEBUG("Send module config: store forward");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.store_forward = moduleConfig.store_forward;
|
fromRadioScratch.moduleConfig.payload_variant.store_forward = moduleConfig.store_forward;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_range_test_tag:
|
case meshtastic_ModuleConfig_range_test_tag:
|
||||||
|
LOG_DEBUG("Send module config: range test");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.range_test = moduleConfig.range_test;
|
fromRadioScratch.moduleConfig.payload_variant.range_test = moduleConfig.range_test;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_telemetry_tag:
|
case meshtastic_ModuleConfig_telemetry_tag:
|
||||||
|
LOG_DEBUG("Send module config: telemetry");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.telemetry = moduleConfig.telemetry;
|
fromRadioScratch.moduleConfig.payload_variant.telemetry = moduleConfig.telemetry;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_canned_message_tag:
|
case meshtastic_ModuleConfig_canned_message_tag:
|
||||||
|
LOG_DEBUG("Send module config: canned message");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.canned_message = moduleConfig.canned_message;
|
fromRadioScratch.moduleConfig.payload_variant.canned_message = moduleConfig.canned_message;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_audio_tag:
|
case meshtastic_ModuleConfig_audio_tag:
|
||||||
|
LOG_DEBUG("Send module config: audio");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_audio_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_audio_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.audio = moduleConfig.audio;
|
fromRadioScratch.moduleConfig.payload_variant.audio = moduleConfig.audio;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_remote_hardware_tag:
|
case meshtastic_ModuleConfig_remote_hardware_tag:
|
||||||
|
LOG_DEBUG("Send module config: remote hardware");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_neighbor_info_tag:
|
case meshtastic_ModuleConfig_neighbor_info_tag:
|
||||||
|
LOG_DEBUG("Send module config: neighbor info");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||||
|
LOG_DEBUG("Send module config: detection sensor");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.detection_sensor = moduleConfig.detection_sensor;
|
fromRadioScratch.moduleConfig.payload_variant.detection_sensor = moduleConfig.detection_sensor;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_ambient_lighting_tag:
|
case meshtastic_ModuleConfig_ambient_lighting_tag:
|
||||||
|
LOG_DEBUG("Send module config: ambient lighting");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;
|
fromRadioScratch.moduleConfig.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_paxcounter_tag:
|
case meshtastic_ModuleConfig_paxcounter_tag:
|
||||||
|
LOG_DEBUG("Send module config: paxcounter");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.paxcounter = moduleConfig.paxcounter;
|
fromRadioScratch.moduleConfig.payload_variant.paxcounter = moduleConfig.paxcounter;
|
||||||
break;
|
break;
|
||||||
@ -443,7 +463,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
return numbytes;
|
return numbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG("no FromRadio packet available");
|
LOG_DEBUG("No FromRadio packet available");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,9 +187,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
|||||||
handleReceived(p, src);
|
handleReceived(p, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested
|
// don't override if a channel was requested and no need to set it when PKI is enforced
|
||||||
|
if (!p->channel && !p->pki_encrypted) {
|
||||||
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
|
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
|
||||||
if (node && node->user.public_key.size == 0) {
|
if (node) {
|
||||||
p->channel = node->channel;
|
p->channel = node->channel;
|
||||||
LOG_DEBUG("localSend to channel %d", p->channel);
|
LOG_DEBUG("localSend to channel %d", p->channel);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "PhoneAPI.h"
|
#include "PhoneAPI.h"
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
#include "concurrency/OSThread.h"
|
#include "concurrency/OSThread.h"
|
||||||
|
#include <cstdarg>
|
||||||
|
|
||||||
// A To/FromRadio packet + our 32 bit header
|
// A To/FromRadio packet + our 32 bit header
|
||||||
#define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t))
|
#define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t))
|
||||||
|
@ -81,7 +81,7 @@ typedef struct _meshtastic_NodeInfoLite {
|
|||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
||||||
bool via_mqtt;
|
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;
|
bool has_hops_away;
|
||||||
uint8_t hops_away;
|
uint8_t hops_away;
|
||||||
/* True if node is in our favorites list
|
/* True if node is in our favorites list
|
||||||
|
@ -188,7 +188,7 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
|||||||
/* Maximum encoded size of messages (where known) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
||||||
#define meshtastic_LocalConfig_size 735
|
#define meshtastic_LocalConfig_size 735
|
||||||
#define meshtastic_LocalModuleConfig_size 697
|
#define meshtastic_LocalModuleConfig_size 699
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
@ -720,7 +720,7 @@ typedef struct _meshtastic_MeshPacket {
|
|||||||
Set during reception to indicate the SNR of this packet.
|
Set during reception to indicate the SNR of this packet.
|
||||||
Used to collect statistics on current link quality. */
|
Used to collect statistics on current link quality. */
|
||||||
float rx_snr;
|
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...
|
if 1, allow hopping through one node, etc...
|
||||||
For our usecase real world topologies probably have a max of about 3.
|
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. */
|
This field is normally placed into a few of bits in the header. */
|
||||||
@ -791,7 +791,7 @@ typedef struct _meshtastic_NodeInfo {
|
|||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
||||||
bool via_mqtt;
|
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;
|
bool has_hops_away;
|
||||||
uint8_t hops_away;
|
uint8_t hops_away;
|
||||||
/* True if node is in our favorites list
|
/* True if node is in our favorites list
|
||||||
|
@ -153,8 +153,11 @@ typedef struct _meshtastic_ModuleConfig_NeighborInfoConfig {
|
|||||||
/* Whether the Module is enabled */
|
/* Whether the Module is enabled */
|
||||||
bool enabled;
|
bool enabled;
|
||||||
/* Interval in seconds of how often we should try to send our
|
/* Interval in seconds of how often we should try to send our
|
||||||
Neighbor Info to the mesh */
|
Neighbor Info (minimum is 14400, i.e., 4 hours) */
|
||||||
uint32_t update_interval;
|
uint32_t update_interval;
|
||||||
|
/* Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa.
|
||||||
|
Note that this is not available on a channel with default key and name. */
|
||||||
|
bool transmit_over_lora;
|
||||||
} meshtastic_ModuleConfig_NeighborInfoConfig;
|
} meshtastic_ModuleConfig_NeighborInfoConfig;
|
||||||
|
|
||||||
/* Detection Sensor Module Config */
|
/* Detection Sensor Module Config */
|
||||||
@ -501,7 +504,7 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_default}
|
#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_default}
|
||||||
#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 0}
|
#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 0}
|
||||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0, 0, 0, {meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default}}
|
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0, 0, 0, {meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default}}
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_default {0, 0}
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_default {0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||||
#define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0}
|
||||||
@ -517,7 +520,7 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}
|
#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}
|
||||||
#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 0}
|
#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 0}
|
||||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0, 0, 0, {meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero}}
|
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0, 0, 0, {meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero}}
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_zero {0, 0}
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_zero {0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||||
#define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0}
|
#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0}
|
||||||
@ -546,6 +549,7 @@ extern "C" {
|
|||||||
#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_tag 11
|
#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_tag 11
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2
|
||||||
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_transmit_over_lora_tag 3
|
||||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1
|
#define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1
|
||||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_minimum_broadcast_secs_tag 2
|
#define meshtastic_ModuleConfig_DetectionSensorConfig_minimum_broadcast_secs_tag 2
|
||||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_state_broadcast_secs_tag 3
|
#define meshtastic_ModuleConfig_DetectionSensorConfig_state_broadcast_secs_tag 3
|
||||||
@ -709,7 +713,8 @@ X(a, STATIC, REPEATED, MESSAGE, available_pins, 3)
|
|||||||
|
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_FIELDLIST(X, a) \
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_FIELDLIST(X, a) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, update_interval, 2)
|
X(a, STATIC, SINGULAR, UINT32, update_interval, 2) \
|
||||||
|
X(a, STATIC, SINGULAR, BOOL, transmit_over_lora, 3)
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_CALLBACK NULL
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_CALLBACK NULL
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_DEFAULT NULL
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_DEFAULT NULL
|
||||||
|
|
||||||
@ -884,7 +889,7 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
|||||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_size 42
|
#define meshtastic_ModuleConfig_ExternalNotificationConfig_size 42
|
||||||
#define meshtastic_ModuleConfig_MQTTConfig_size 254
|
#define meshtastic_ModuleConfig_MQTTConfig_size 254
|
||||||
#define meshtastic_ModuleConfig_MapReportSettings_size 12
|
#define meshtastic_ModuleConfig_MapReportSettings_size 12
|
||||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_size 8
|
#define meshtastic_ModuleConfig_NeighborInfoConfig_size 10
|
||||||
#define meshtastic_ModuleConfig_PaxcounterConfig_size 30
|
#define meshtastic_ModuleConfig_PaxcounterConfig_size 30
|
||||||
#define meshtastic_ModuleConfig_RangeTestConfig_size 10
|
#define meshtastic_ModuleConfig_RangeTestConfig_size 10
|
||||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
||||||
|
@ -325,7 +325,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
this->shift = !this->shift;
|
this->shift = !this->shift;
|
||||||
} else if (keyTapped == "⌫") {
|
} else if (keyTapped == "⌫") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = 0x08;
|
this->payload = 0x08;
|
||||||
|
|
||||||
@ -341,7 +343,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
validEvent = true;
|
validEvent = true;
|
||||||
} else if (keyTapped == " ") {
|
} else if (keyTapped == " ") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = keyTapped[0];
|
this->payload = keyTapped[0];
|
||||||
|
|
||||||
@ -361,7 +365,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
this->shift = false;
|
this->shift = false;
|
||||||
} else if (keyTapped != "") {
|
} else if (keyTapped != "") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
||||||
|
|
||||||
@ -830,6 +836,11 @@ void CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState
|
|||||||
|
|
||||||
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
||||||
|
|
||||||
|
#ifdef RAK14014 // Optimize the touch range of the virtual keyboard in the bottom row
|
||||||
|
if (outerIndex == outerSize - 1) {
|
||||||
|
updatedLetter.rectHeight = 240 - yOffset;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;
|
this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;
|
||||||
|
|
||||||
float characterOffset = ((cellWidth / 2) - (letter.width / 2));
|
float characterOffset = ((cellWidth / 2) - (letter.width / 2));
|
||||||
|
@ -68,6 +68,10 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
|
|
||||||
String drawWithCursor(String text, int cursor);
|
String drawWithCursor(String text, int cursor);
|
||||||
|
|
||||||
|
#ifdef RAK14014
|
||||||
|
cannedMessageModuleRunState getRunState() const { return runState; }
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-Override the wantPacket method. We need the Routing Messages to look for ACKs.
|
-Override the wantPacket method. We need the Routing Messages to look for ACKs.
|
||||||
*/
|
*/
|
||||||
|
@ -121,7 +121,12 @@ Will be used for broadcast.
|
|||||||
*/
|
*/
|
||||||
int32_t NeighborInfoModule::runOnce()
|
int32_t NeighborInfoModule::runOnce()
|
||||||
{
|
{
|
||||||
sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false);
|
if (moduleConfig.neighbor_info.transmit_over_lora && !channels.isDefaultChannel(channels.getPrimaryIndex()) &&
|
||||||
|
airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) {
|
||||||
|
sendNeighborInfo(NODENUM_BROADCAST, false);
|
||||||
|
} else {
|
||||||
|
sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false);
|
||||||
|
}
|
||||||
return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);
|
return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
#include "meshtastic/atak.pb.h"
|
#include "meshtastic/atak.pb.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include <Throttle.h>
|
#include <Throttle.h>
|
||||||
}
|
|
||||||
|
|
||||||
PositionModule *positionModule;
|
PositionModule *positionModule;
|
||||||
|
|
||||||
|
@ -376,12 +376,14 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m
|
|||||||
LOG_INFO("AHTX0+BMP280 module detected: using temp from BMP280 and humy from AHTX0");
|
LOG_INFO("AHTX0+BMP280 module detected: using temp from BMP280 and humy from AHTX0");
|
||||||
aht10Sensor.getMetrics(&m_ahtx);
|
aht10Sensor.getMetrics(&m_ahtx);
|
||||||
m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity;
|
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 {
|
} else {
|
||||||
// prefer bmp3xx temp if both sensors are present, fetch only humidity
|
// prefer bmp3xx temp if both sensors are present, fetch only humidity
|
||||||
meshtastic_Telemetry m_ahtx = meshtastic_Telemetry_init_zero;
|
meshtastic_Telemetry m_ahtx = meshtastic_Telemetry_init_zero;
|
||||||
LOG_INFO("AHTX0+BMP3XX module detected: using temp from BMP3XX and humy from AHTX0");
|
LOG_INFO("AHTX0+BMP3XX module detected: using temp from BMP3XX and humy from AHTX0");
|
||||||
aht10Sensor.getMetrics(&m_ahtx);
|
aht10Sensor.getMetrics(&m_ahtx);
|
||||||
m->variant.environment_metrics.relative_humidity = m_ahtx.variant.environment_metrics.relative_humidity;
|
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()) {
|
if (max17048Sensor.hasSensor()) {
|
||||||
|
@ -580,6 +580,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
|
|||||||
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("nothing, pkt not decrypted");
|
LOG_DEBUG("nothing, pkt not decrypted");
|
||||||
|
mqttPool.release(env);
|
||||||
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
#define HAS_32768HZ
|
#define HAS_32768HZ
|
||||||
#define ADC_CTRL_ENABLED LOW
|
#define ADC_CTRL_ENABLED LOW
|
||||||
|
|
||||||
|
#define NO_EXT_GPIO 1
|
||||||
|
#define NO_GPS 1
|
||||||
|
|
||||||
// LoRa
|
// LoRa
|
||||||
#define USE_SX1262
|
#define USE_SX1262
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
#define HAS_32768HZ
|
#define HAS_32768HZ
|
||||||
#define ADC_CTRL_ENABLED LOW
|
#define ADC_CTRL_ENABLED LOW
|
||||||
|
|
||||||
|
#define NO_EXT_GPIO 1
|
||||||
|
#define NO_GPS 1
|
||||||
|
|
||||||
// LoRa
|
// LoRa
|
||||||
#define USE_SX1262
|
#define USE_SX1262
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
extends = portduino_base
|
extends = portduino_base
|
||||||
; The pkg-config commands below optionally add link flags.
|
; The pkg-config commands below optionally add link flags.
|
||||||
; the || : is just a "or run the null command" to avoid returning an error code
|
; 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 libulfius --silence-errors || :
|
||||||
!pkg-config --libs openssl --silence-errors || :
|
!pkg-config --libs openssl --silence-errors || :
|
||||||
board = cross_platform
|
board = cross_platform
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
; The very slick RAK wireless RAK10701 Field Tester device. Note you will have to flash to Arduino bootloader to use this firmware. Be aware touch is not currently working.
|
; The very slick RAK wireless RAK10701 Field Tester device. Note you will have to flash to Arduino bootloader to use this firmware. Be aware touch is not currently working.
|
||||||
[env:rak10701]
|
[env:rak_wismeshtap]
|
||||||
extends = nrf52840_base
|
extends = nrf52840_base
|
||||||
board_level = extra
|
board_level = extra
|
||||||
board = wiscore_rak4631
|
board = wiscore_rak4631
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak10701 -D RAK_4631
|
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak_wismeshtap -D RAK_4631
|
||||||
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak10701> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
|
||||||
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak_wismeshtap> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
@ -243,7 +243,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
|||||||
// Therefore must be 1 to keep peripherals powered
|
// Therefore must be 1 to keep peripherals powered
|
||||||
// Power is on the controllable 3V3_S rail
|
// Power is on the controllable 3V3_S rail
|
||||||
// #define PIN_GPS_RESET (34)
|
// #define PIN_GPS_RESET (34)
|
||||||
#define PIN_GPS_EN PIN_3V3_EN
|
// #define PIN_GPS_EN PIN_3V3_EN
|
||||||
#define PIN_GPS_PPS (17) // Pulse per second input from the GPS
|
#define PIN_GPS_PPS (17) // Pulse per second input from the GPS
|
||||||
|
|
||||||
#define GPS_RX_PIN PIN_SERIAL1_RX
|
#define GPS_RX_PIN PIN_SERIAL1_RX
|
@ -216,6 +216,8 @@ External serial flash WP25R1635FZUIL0
|
|||||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||||
#define ADC_MULTIPLIER (2.0F)
|
#define ADC_MULTIPLIER (2.0F)
|
||||||
|
|
||||||
|
#define NO_EXT_GPIO 1
|
||||||
|
|
||||||
#define HAS_RTC 1
|
#define HAS_RTC 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user