sforkowany z mirror/meshtastic-firmware
				
			Merge remote-tracking branch 'origin' into fix-hydra-rf-switch
						commit
						4029f731c9
					
				|  | @ -23,9 +23,9 @@ jobs: | ||||||
|       matrix: |       matrix: | ||||||
|         include: |         include: | ||||||
|           - board: rak11200 |           - board: rak11200 | ||||||
|           - board: tlora-v2-1-1.6 |           - board: tlora-v2-1-1_6 | ||||||
|           - board: tbeam |           - board: tbeam | ||||||
|           - board: heltec-v2.1 |           - board: heltec-v2_1 | ||||||
|           - board: meshtastic-diy-v1 |           - board: meshtastic-diy-v1 | ||||||
|           - board: rak4631 |           - board: rak4631 | ||||||
|           - board: t-echo |           - board: t-echo | ||||||
|  | @ -57,13 +57,13 @@ jobs: | ||||||
|           - board: tlora-v2 |           - board: tlora-v2 | ||||||
|           - board: tlora-v1 |           - board: tlora-v1 | ||||||
|           - board: tlora_v1_3 |           - board: tlora_v1_3 | ||||||
|           - board: tlora-v2-1-1.6 |           - board: tlora-v2-1-1_6 | ||||||
|           - board: tlora-v2-1-1.8 |           - board: tlora-v2-1-1_8 | ||||||
|           - board: tbeam |           - board: tbeam | ||||||
|           - board: heltec-v1 |           - board: heltec-v1 | ||||||
|           - board: heltec-v2.0 |           - board: heltec-v2_0 | ||||||
|           - board: heltec-v2.1 |           - board: heltec-v2_1 | ||||||
|           - board: tbeam0.7 |           - board: tbeam0_7 | ||||||
|           - board: meshtastic-diy-v1 |           - board: meshtastic-diy-v1 | ||||||
|           - board: meshtastic-dr-dev |           - board: meshtastic-dr-dev | ||||||
|           - board: nano-g1 |           - board: nano-g1 | ||||||
|  |  | ||||||
|  | @ -5,3 +5,4 @@ | ||||||
| plugins | plugins | ||||||
| user_trunk.yaml | user_trunk.yaml | ||||||
| user.yaml | user.yaml | ||||||
|  | shims | ||||||
|  |  | ||||||
|  | @ -1,36 +1,37 @@ | ||||||
| version: 0.1 | version: 0.1 | ||||||
| cli: | cli: | ||||||
|   version: 1.7.0 |   version: 1.9.1 | ||||||
| plugins: | plugins: | ||||||
|   sources: |   sources: | ||||||
|     - id: trunk |     - id: trunk | ||||||
|       ref: v0.0.14 |       ref: v0.0.17 | ||||||
|       uri: https://github.com/trunk-io/plugins |       uri: https://github.com/trunk-io/plugins | ||||||
| lint: | lint: | ||||||
|   enabled: |   enabled: | ||||||
|     - ruff@0.0.260 |     - taplo@0.7.0 | ||||||
|     - yamllint@1.30.0 |     - ruff@0.0.265 | ||||||
|  |     - yamllint@1.31.0 | ||||||
|     - isort@5.12.0 |     - isort@5.12.0 | ||||||
|     - markdownlint@0.33.0 |     - markdownlint@0.34.0 | ||||||
|     - oxipng@8.0.0 |     - oxipng@8.0.0 | ||||||
|     - svgo@3.0.2 |     - svgo@3.0.2 | ||||||
|     - actionlint@1.6.23 |     - actionlint@1.6.24 | ||||||
|     - flake8@6.0.0 |     - flake8@6.0.0 | ||||||
|     - hadolint@2.12.0 |     - hadolint@2.12.0 | ||||||
|     - shfmt@3.5.0 |     - shfmt@3.5.0 | ||||||
|     - shellcheck@0.9.0 |     - shellcheck@0.9.0 | ||||||
|     - black@23.3.0 |     - black@23.3.0 | ||||||
|     - git-diff-check |     - git-diff-check | ||||||
|     - gitleaks@8.16.2 |     - gitleaks@8.16.3 | ||||||
|     - clang-format@14.0.0 |     - clang-format@14.0.0 | ||||||
|     - prettier@2.8.7 |     - prettier@2.8.8 | ||||||
|   disabled: |   disabled: | ||||||
|     - taplo@0.7.0 |     - taplo@0.7.0 | ||||||
|     - shellcheck@0.9.0 |     - shellcheck@0.9.0 | ||||||
|     - shfmt@3.5.0 |     - shfmt@3.5.0 | ||||||
|     - oxipng@8.0.0 |     - oxipng@8.0.0 | ||||||
|     - actionlint@1.6.22 |     - actionlint@1.6.22 | ||||||
|     - markdownlint@0.33.0 |     - markdownlint@0.34.0 | ||||||
|     - hadolint@2.12.0 |     - hadolint@2.12.0 | ||||||
|     - svgo@3.0.2 |     - svgo@3.0.2 | ||||||
| runtimes: | runtimes: | ||||||
|  |  | ||||||
|  | @ -2,11 +2,14 @@ | ||||||
| [esp32_base] | [esp32_base] | ||||||
| extends = arduino_base | extends = arduino_base | ||||||
| platform = platformio/espressif32@^6.1.0 | platform = platformio/espressif32@^6.1.0 | ||||||
|  | 
 | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> |   ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> | ||||||
|  | 
 | ||||||
| upload_speed = 921600 | upload_speed = 921600 | ||||||
| debug_init_break = tbreak setup | debug_init_break = tbreak setup | ||||||
| monitor_filters = esp32_exception_decoder | monitor_filters = esp32_exception_decoder | ||||||
|  | 
 | ||||||
| board_build.filesystem = littlefs | board_build.filesystem = littlefs | ||||||
| 
 | 
 | ||||||
| # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. | # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. | ||||||
|  | @ -34,6 +37,7 @@ lib_deps = | ||||||
|   ${environmental_base.lib_deps} |   ${environmental_base.lib_deps} | ||||||
|   https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 |   https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 | ||||||
|   h2zero/NimBLE-Arduino@^1.4.0 |   h2zero/NimBLE-Arduino@^1.4.0 | ||||||
|  |   jgromes/RadioLib@^6.0.0 | ||||||
|   https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 |   https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 | ||||||
|   https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f |   https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,44 +1,5 @@ | ||||||
| [esp32c3_base] | [esp32c3_base] | ||||||
| extends = arduino_base | extends = esp32_base | ||||||
| platform = platformio/espressif32@^6.1.0 | 
 | ||||||
| build_src_filter =  |  | ||||||
|   ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> |  | ||||||
| upload_speed = 961200 |  | ||||||
| monitor_speed = 115200 | monitor_speed = 115200 | ||||||
| debug_init_break = tbreak setup |  | ||||||
| monitor_filters = esp32_c3_exception_decoder | monitor_filters = esp32_c3_exception_decoder | ||||||
| board_build.filesystem = littlefs |  | ||||||
| 
 |  | ||||||
| # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. |  | ||||||
| # See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h |  | ||||||
| # This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h |  | ||||||
| build_flags = |  | ||||||
|   ${arduino_base.build_flags}  |  | ||||||
|   -Wall  |  | ||||||
|   -Wextra  |  | ||||||
|   -Isrc/platform/esp32  |  | ||||||
|   -std=c++11  |  | ||||||
|   -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG  |  | ||||||
|   -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG  |  | ||||||
|   -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL |  | ||||||
|   -DCONFIG_BT_NIMBLE_ENABLED  |  | ||||||
|   -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 |  | ||||||
|   -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 |  | ||||||
|   -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING |  | ||||||
|   ;-DDEBUG_HEAP |  | ||||||
|    |  | ||||||
| lib_deps = |  | ||||||
|   ${arduino_base.lib_deps} |  | ||||||
|   ${networking_base.lib_deps} |  | ||||||
|   ${environmental_base.lib_deps} |  | ||||||
|   https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 |  | ||||||
|   h2zero/NimBLE-Arduino@^1.4.0 |  | ||||||
|   https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 |  | ||||||
|   https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f |  | ||||||
| lib_ignore =  |  | ||||||
|   segger_rtt |  | ||||||
|   ESP32 BLE Arduino |  | ||||||
| 
 |  | ||||||
| ; customize the partition table |  | ||||||
| ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables |  | ||||||
| board_build.partitions = partition-table.csv |  | ||||||
|  | @ -1,47 +1,16 @@ | ||||||
| [esp32s2_base] | [esp32s2_base] | ||||||
| extends = arduino_base | extends = esp32_base | ||||||
| platform = platformio/espressif32@^6.1.0 | 
 | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> -<nimble/> |   ${esp32_base.build_src_filter} -<nimble/> | ||||||
| upload_speed = 961200 | 
 | ||||||
| monitor_speed = 115200 | monitor_speed = 115200 | ||||||
| debug_init_break = tbreak setup |  | ||||||
| monitor_filters = esp32_exception_decoder |  | ||||||
| board_build.filesystem = littlefs |  | ||||||
| 
 | 
 | ||||||
| # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. |  | ||||||
| # See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h |  | ||||||
| # This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h |  | ||||||
| build_flags = | build_flags = | ||||||
|   ${arduino_base.build_flags}  |   ${esp32_base.build_flags}  | ||||||
|   -Wall  |  | ||||||
|   -Wextra  |  | ||||||
|   -Isrc/platform/esp32  |  | ||||||
|   -std=c++11  |  | ||||||
|   -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG  |  | ||||||
|   -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG  |  | ||||||
|   -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL |  | ||||||
|   -DAXP_DEBUG_PORT=Serial  |  | ||||||
|   -DCONFIG_BT_NIMBLE_ENABLED  |  | ||||||
|   -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 |  | ||||||
|   -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 |  | ||||||
|   -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING |  | ||||||
|   -DHAS_BLUETOOTH=0 |   -DHAS_BLUETOOTH=0 | ||||||
|   ;-DDEBUG_HEAP |  | ||||||
|    |    | ||||||
| lib_deps = |  | ||||||
|   ${arduino_base.lib_deps} |  | ||||||
|   ${networking_base.lib_deps} |  | ||||||
|   ${environmental_base.lib_deps} |  | ||||||
|   https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 |  | ||||||
|   https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 |  | ||||||
|   https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f |  | ||||||
| 
 |  | ||||||
| lib_ignore =  | lib_ignore =  | ||||||
|   segger_rtt |   ${esp32_base.lib_ignore}  | ||||||
|   ESP32 BLE Arduino |   NimBLE-Arduino | ||||||
| 
 |  | ||||||
| ; customize the partition table |  | ||||||
| ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables |  | ||||||
| board_build.partitions = partition-table.csv |  | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,47 +1,5 @@ | ||||||
| [esp32s3_base] | [esp32s3_base] | ||||||
| extends = arduino_base | extends = esp32_base | ||||||
| platform = platformio/espressif32@^6.1.0 | 
 | ||||||
| build_src_filter =  |  | ||||||
|   ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> |  | ||||||
| upload_speed = 961200 |  | ||||||
| monitor_speed = 115200 | monitor_speed = 115200 | ||||||
| debug_init_break = tbreak setup |  | ||||||
| monitor_filters = esp32_exception_decoder |  | ||||||
| board_build.filesystem = littlefs |  | ||||||
| 
 |  | ||||||
| # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. |  | ||||||
| # See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h |  | ||||||
| # This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h |  | ||||||
| build_flags = |  | ||||||
|   ${arduino_base.build_flags}  |  | ||||||
|   -Wall  |  | ||||||
|   -Wextra  |  | ||||||
|   -Isrc/platform/esp32  |  | ||||||
|   -std=c++11  |  | ||||||
|   -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG  |  | ||||||
|   -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG  |  | ||||||
|   -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL |  | ||||||
|   -DAXP_DEBUG_PORT=Serial  |  | ||||||
|   -DCONFIG_BT_NIMBLE_ENABLED  |  | ||||||
|   -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 |  | ||||||
|   -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 |  | ||||||
|   -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING |  | ||||||
|   ;-DDEBUG_HEAP |  | ||||||
|    |  | ||||||
| lib_deps = |  | ||||||
|   ${arduino_base.lib_deps} |  | ||||||
|   ${networking_base.lib_deps} |  | ||||||
|   ${environmental_base.lib_deps} |  | ||||||
|   https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2 |  | ||||||
|   h2zero/NimBLE-Arduino@^1.4.0 |  | ||||||
|   https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6 |  | ||||||
|   https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f |  | ||||||
| 
 |  | ||||||
| lib_ignore =  |  | ||||||
|   segger_rtt |  | ||||||
|   ESP32 BLE Arduino |  | ||||||
| 
 |  | ||||||
| ; customize the partition table |  | ||||||
| ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables |  | ||||||
| board_build.partitions = partition-table.csv |  | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,18 +1,20 @@ | ||||||
| [nrf52_base] | [nrf52_base] | ||||||
| ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files | ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files | ||||||
| platform = platformio/nordicnrf52@^9.5.0 | platform = platformio/nordicnrf52@^9.5.0 | ||||||
| 
 |  | ||||||
| extends = arduino_base | extends = arduino_base | ||||||
|  | 
 | ||||||
| build_type = debug ; I'm debugging with ICE a lot now | build_type = debug ; I'm debugging with ICE a lot now | ||||||
| build_flags =  | build_flags =  | ||||||
|   ${arduino_base.build_flags} -Wno-unused-variable  |   ${arduino_base.build_flags} -Wno-unused-variable  | ||||||
|   -Isrc/platform/nrf52 |   -Isrc/platform/nrf52 | ||||||
|  | 
 | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/rp2040> -<mesh/eth/> |   ${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/rp2040> -<mesh/eth/> | ||||||
|  | 
 | ||||||
|  | lib_deps= | ||||||
|  |   ${arduino_base.lib_deps} | ||||||
|  |   jgromes/RadioLib@^6.0.0 | ||||||
|  | 
 | ||||||
| lib_ignore = | lib_ignore = | ||||||
|   BluetoothOTA |   BluetoothOTA | ||||||
|    | 
 | ||||||
| ; Note: By default no lora device is created for this build - it uses a simulated interface |  | ||||||
| [env:feather_nrf52832] |  | ||||||
| extends = nrf52_base |  | ||||||
| board = adafruit_feather_nrf52832   |  | ||||||
|  |  | ||||||
|  | @ -0,0 +1,7 @@ | ||||||
|  | [nrf52832_base] | ||||||
|  | extends = nrf52_base | ||||||
|  | 
 | ||||||
|  | build_flags = ${nrf52_base.build_flags}  | ||||||
|  | 
 | ||||||
|  | lib_deps = | ||||||
|  |   ${nrf52_base.lib_deps} | ||||||
|  | @ -1,14 +1,9 @@ | ||||||
| [nrf52840_base] | [nrf52840_base] | ||||||
| extends = nrf52_base | extends = nrf52_base | ||||||
|  | 
 | ||||||
| build_flags = ${nrf52_base.build_flags}  | build_flags = ${nrf52_base.build_flags}  | ||||||
|  | 
 | ||||||
| lib_deps = | lib_deps = | ||||||
|   ${arduino_base.lib_deps} |   ${nrf52_base.lib_deps} | ||||||
|   ${environmental_base.lib_deps} |   ${environmental_base.lib_deps} | ||||||
|   https://github.com/Kongduino/Adafruit_nRFCrypto.git#e31a8825ea3300b163a0a3c1ddd5de34e10e1371 |   https://github.com/Kongduino/Adafruit_nRFCrypto.git#e31a8825ea3300b163a0a3c1ddd5de34e10e1371 | ||||||
| 
 |  | ||||||
| ; Note: By default no lora device is created for this build - it uses a simulated interface |  | ||||||
| [env:nrf52840dk] |  | ||||||
| extends = nrf52840_base |  | ||||||
| board = nrf52840_dk |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| [portduino_base] | [portduino_base] | ||||||
| platform = https://github.com/meshtastic/platform-native.git#096b3c3e9c5c8e19d4c3b6cd803fffef2a9be4c5 | platform = https://github.com/meshtastic/platform-native.git#096b3c3e9c5c8e19d4c3b6cd803fffef2a9be4c5 | ||||||
| framework = arduino | framework = arduino | ||||||
|  | 
 | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${env.build_src_filter}  |   ${env.build_src_filter}  | ||||||
|   -<platform/esp32/>  |   -<platform/esp32/>  | ||||||
|  | @ -16,8 +17,14 @@ build_src_filter = | ||||||
|   -<modules/Telemetry/AirQualityTelemetry.cpp> |   -<modules/Telemetry/AirQualityTelemetry.cpp> | ||||||
|   -<modules/Telemetry/Sensor> |   -<modules/Telemetry/Sensor> | ||||||
|   +<../variants/portduino> |   +<../variants/portduino> | ||||||
|  | 
 | ||||||
| lib_deps = | lib_deps = | ||||||
|   ${env.lib_deps} |   ${env.lib_deps} | ||||||
|   ${networking_base.lib_deps} |   ${networking_base.lib_deps} | ||||||
|   rweather/Crypto@^0.4.0 |   rweather/Crypto@^0.4.0 | ||||||
| build_flags = ${arduino_base.build_flags} -fPIC -Isrc/platform/portduino |   jgromes/RadioLib@^6.0.0 | ||||||
|  | 
 | ||||||
|  | build_flags = | ||||||
|  |   ${arduino_base.build_flags} | ||||||
|  |   -fPIC | ||||||
|  |   -Isrc/platform/portduino | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| [rp2040_base] | [rp2040_base] | ||||||
| platform = https://github.com/maxgerhardt/platform-raspberrypi.git#9f8c10e50b5acd18e7bfd32638199c655be73a5b | platform = https://github.com/maxgerhardt/platform-raspberrypi.git#9f8c10e50b5acd18e7bfd32638199c655be73a5b | ||||||
| extends = arduino_base | extends = arduino_base | ||||||
|  | 
 | ||||||
| board_build.core = earlephilhower | board_build.core = earlephilhower | ||||||
| board_build.filesystem_size = 0.5m | board_build.filesystem_size = 0.5m | ||||||
| build_flags =  | build_flags =  | ||||||
|  | @ -11,9 +12,12 @@ build_flags = | ||||||
| #  -D _POSIX_THREADS | #  -D _POSIX_THREADS | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> |   ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> | ||||||
|  | 
 | ||||||
| lib_ignore = | lib_ignore = | ||||||
|   BluetoothOTA |   BluetoothOTA | ||||||
|  | 
 | ||||||
| lib_deps = | lib_deps = | ||||||
|   ${arduino_base.lib_deps} |   ${arduino_base.lib_deps} | ||||||
|   ${environmental_base.lib_deps} |   ${environmental_base.lib_deps} | ||||||
|  |   jgromes/RadioLib@^6.0.0 | ||||||
|   https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b |   https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b | ||||||
|  |  | ||||||
|  | @ -2,17 +2,19 @@ | ||||||
| platform = platformio/ststm32@^15.4.1 | platform = platformio/ststm32@^15.4.1 | ||||||
| board = generic_wl5e | board = generic_wl5e | ||||||
| framework = arduino | framework = arduino | ||||||
|  | 
 | ||||||
| build_type = debug | build_type = debug | ||||||
| build_flags =  | build_flags =  | ||||||
|   ${arduino_base.build_flags} |   ${arduino_base.build_flags} | ||||||
|   -Isrc/platform/stm32wl -g |   -Isrc/platform/stm32wl -g | ||||||
|   -DHAL_SUBGHZ_MODULE_ENABLED | 
 | ||||||
| #  Arduino/PlatformIO framework-arduinoststm32 package does not presently have SUBGHZSPI support |  | ||||||
| #  -DPIN_SPI_MOSI=PINSUBGHZSPIMOSI -DPIN_SPI_MISO=PINSUBGHZSPIMISO -DPIN_SPI_SCK=PINSUBGHZSPISCK |  | ||||||
| build_src_filter =  | build_src_filter =  | ||||||
|   ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<mqtt/> -<graphics> -<input> -<buzz> -<modules/Telemetry> -<platform/nrf52> -<platform/portduino> -<platform/rp2040> |   ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<mqtt/> -<graphics> -<input> -<buzz> -<modules/Telemetry> -<platform/nrf52> -<platform/portduino> -<platform/rp2040> | ||||||
|  | 
 | ||||||
| lib_deps = | lib_deps = | ||||||
|   ${env.lib_deps} |   ${env.lib_deps} | ||||||
|  |   jgromes/RadioLib@^6.0.0 | ||||||
|   https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b |   https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b | ||||||
|  | 
 | ||||||
| lib_ignore =  | lib_ignore =  | ||||||
|   mathertel/OneButton@^2.0.3 |   mathertel/OneButton@^2.0.3 | ||||||
|  |  | ||||||
|  | @ -66,9 +66,6 @@ lib_deps = | ||||||
|   https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3 |   https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3 | ||||||
|   nanopb/Nanopb@^0.4.7 |   nanopb/Nanopb@^0.4.7 | ||||||
|   erriez/ErriezCRC32@^1.0.1 |   erriez/ErriezCRC32@^1.0.1 | ||||||
|   ; temp: do this till > 5.7.0 release to keep (some) SX1262 and SX1280 working - resolves -705 error during init |  | ||||||
|   https://github.com/jgromes/RadioLib.git#45c5859338590b7eede23cb2f95284c3fb0cf08e |  | ||||||
|   ; jgromes/RadioLib@^5.7.0 |  | ||||||
| 
 | 
 | ||||||
| ; Used for the code analysis in PIO Home / Inspect | ; Used for the code analysis in PIO Home / Inspect | ||||||
| check_tool = cppcheck | check_tool = cppcheck | ||||||
|  | @ -105,7 +102,8 @@ lib_deps = | ||||||
|   adafruit/Adafruit Unified Sensor@^1.1.9 |   adafruit/Adafruit Unified Sensor@^1.1.9 | ||||||
|   adafruit/Adafruit BMP280 Library@^2.6.6 |   adafruit/Adafruit BMP280 Library@^2.6.6 | ||||||
|   adafruit/Adafruit BME280 Library@^2.2.2 |   adafruit/Adafruit BME280 Library@^2.2.2 | ||||||
|   https://github.com/meshtastic/BSEC-Arduino-library.git#452f9a7ffa8b53e1debe2c454fe375dfad98b507 |   boschsensortec/BSEC2 Software Library@^1.3.2200 | ||||||
|  |   boschsensortec/BME68x Sensor Library@^1.1.40407 | ||||||
|   adafruit/Adafruit MCP9808 Library@^2.0.0 |   adafruit/Adafruit MCP9808 Library@^2.0.0 | ||||||
|   adafruit/Adafruit INA260 Library@^1.5.0 |   adafruit/Adafruit INA260 Library@^1.5.0 | ||||||
|   adafruit/Adafruit INA219@^1.2.0 |   adafruit/Adafruit INA219@^1.2.0 | ||||||
|  |  | ||||||
|  | @ -124,6 +124,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| #define MPU6050_ADDR 0x68 | #define MPU6050_ADDR 0x68 | ||||||
| #define LIS3DH_ADR 0x18 | #define LIS3DH_ADR 0x18 | ||||||
| 
 | 
 | ||||||
|  | // -----------------------------------------------------------------------------
 | ||||||
|  | // LED
 | ||||||
|  | // -----------------------------------------------------------------------------
 | ||||||
|  | #define NCP5623_ADDR 0x38 | ||||||
|  | 
 | ||||||
| // -----------------------------------------------------------------------------
 | // -----------------------------------------------------------------------------
 | ||||||
| // Security
 | // Security
 | ||||||
| // -----------------------------------------------------------------------------
 | // -----------------------------------------------------------------------------
 | ||||||
|  |  | ||||||
|  | @ -33,6 +33,7 @@ class ScanI2C | ||||||
|         PMSA0031, |         PMSA0031, | ||||||
|         MPU6050, |         MPU6050, | ||||||
|         LIS3DH, |         LIS3DH, | ||||||
|  |         NCP5623, | ||||||
|     } DeviceType; |     } DeviceType; | ||||||
| 
 | 
 | ||||||
|     // typedef uint8_t DeviceAddress;
 |     // typedef uint8_t DeviceAddress;
 | ||||||
|  |  | ||||||
|  | @ -213,6 +213,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port) | ||||||
|                 break; |                 break; | ||||||
| 
 | 
 | ||||||
|                 SCAN_SIMPLE_CASE(ST7567_ADDRESS, SCREEN_ST7567, "st7567 display found\n") |                 SCAN_SIMPLE_CASE(ST7567_ADDRESS, SCREEN_ST7567, "st7567 display found\n") | ||||||
|  |                 SCAN_SIMPLE_CASE(NCP5623_ADDR, NCP5623, "NCP5623 RGB LED found\n"); | ||||||
| 
 | 
 | ||||||
| #ifdef HAS_PMU | #ifdef HAS_PMU | ||||||
|                 SCAN_SIMPLE_CASE(XPOWERS_AXP192_AXP2101_ADDRESS, PMU_AXP192_AXP2101, "axp192/axp2101 PMU found\n") |                 SCAN_SIMPLE_CASE(XPOWERS_AXP192_AXP2101_ADDRESS, PMU_AXP192_AXP2101, "axp192/axp2101 PMU found\n") | ||||||
|  |  | ||||||
|  | @ -1,5 +1,7 @@ | ||||||
| #include "NMEAWPL.h" | #include "NMEAWPL.h" | ||||||
| #include "GeoCoord.h" | #include "GeoCoord.h" | ||||||
|  | #include "RTC.h" | ||||||
|  | #include <time.h> | ||||||
| 
 | 
 | ||||||
| /* -------------------------------------------
 | /* -------------------------------------------
 | ||||||
|  *        1       2 3        4 5    6 |  *        1       2 3        4 5    6 | ||||||
|  | @ -56,12 +58,18 @@ uint32_t printWPL(char *buf, size_t bufsz, const meshtastic_Position &pos, const | ||||||
| uint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos) | uint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos) | ||||||
| { | { | ||||||
|     GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude); |     GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude); | ||||||
|     uint32_t len = |     tm *t = localtime((time_t *)&pos.timestamp); | ||||||
|         snprintf(buf, bufsz, "$GNGGA,%06u.%03u,%02d%07.4f,%c,%03d%07.4f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d", pos.time / 1000, |     if (getRTCQuality() > 0) { // use the device clock if we got time from somewhere. If not, use the GPS timestamp.
 | ||||||
|                  pos.time % 1000, geoCoord.getDMSLatDeg(), (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6, |         uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice); | ||||||
|                  geoCoord.getDMSLatCP(), geoCoord.getDMSLonDeg(), |         t = localtime((time_t *)&rtc_sec); | ||||||
|                  (abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6, geoCoord.getDMSLonCP(), pos.fix_type, |     } | ||||||
|                  pos.sats_in_view, pos.HDOP, geoCoord.getAltitude(), 'M', pos.altitude_geoidal_separation, 'M', 0, 0); | 
 | ||||||
|  |     uint32_t len = snprintf( | ||||||
|  |         buf, bufsz, "$GNGGA,%02d%02d%02d.%02d,%02d%07.4f,%c,%03d%07.4f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d", t->tm_hour, | ||||||
|  |         t->tm_min, t->tm_sec, pos.timestamp_millis_adjust, geoCoord.getDMSLatDeg(), | ||||||
|  |         (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6, geoCoord.getDMSLatCP(), geoCoord.getDMSLonDeg(), | ||||||
|  |         (abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6, geoCoord.getDMSLonCP(), pos.fix_quality, | ||||||
|  |         pos.sats_in_view, pos.HDOP, geoCoord.getAltitude(), 'M', pos.altitude_geoidal_separation, 'M', 0, 0); | ||||||
| 
 | 
 | ||||||
|     uint32_t chk = 0; |     uint32_t chk = 0; | ||||||
|     for (uint32_t i = 1; i < len; i++) { |     for (uint32_t i = 1; i < len; i++) { | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								src/main.cpp
								
								
								
								
							
							
						
						
									
										23
									
								
								src/main.cpp
								
								
								
								
							|  | @ -100,6 +100,8 @@ uint8_t kb_model; | ||||||
| ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE; | ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE; | ||||||
| // The I2C address of the Accelerometer (if found)
 | // The I2C address of the Accelerometer (if found)
 | ||||||
| ScanI2C::DeviceAddress accelerometer_found = ScanI2C::ADDRESS_NONE; | ScanI2C::DeviceAddress accelerometer_found = ScanI2C::ADDRESS_NONE; | ||||||
|  | // The I2C address of the RGB LED (if found)
 | ||||||
|  | ScanI2C::FoundDevice rgb_found = ScanI2C::FoundDevice(ScanI2C::DeviceType::NONE, ScanI2C::ADDRESS_NONE); | ||||||
| 
 | 
 | ||||||
| #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) | #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) | ||||||
| ATECCX08A atecc; | ATECCX08A atecc; | ||||||
|  | @ -159,6 +161,7 @@ static OSThread *buttonThread; | ||||||
| uint32_t ButtonThread::longPressTime = 0; | uint32_t ButtonThread::longPressTime = 0; | ||||||
| #endif | #endif | ||||||
| static OSThread *accelerometerThread; | static OSThread *accelerometerThread; | ||||||
|  | SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); | ||||||
| 
 | 
 | ||||||
| RadioInterface *rIf = NULL; | RadioInterface *rIf = NULL; | ||||||
| 
 | 
 | ||||||
|  | @ -234,8 +237,6 @@ void setup() | ||||||
| 
 | 
 | ||||||
|     fsInit(); |     fsInit(); | ||||||
| 
 | 
 | ||||||
|     router = new ReliableRouter(); |  | ||||||
| 
 |  | ||||||
| #ifdef I2C_SDA1 | #ifdef I2C_SDA1 | ||||||
|     Wire1.begin(I2C_SDA1, I2C_SCL1); |     Wire1.begin(I2C_SDA1, I2C_SCL1); | ||||||
| #endif | #endif | ||||||
|  | @ -346,6 +347,8 @@ void setup() | ||||||
|      * nodeTelemetrySensorsMap singleton. This wraps that logic in a temporary scope to declare the temporary field |      * nodeTelemetrySensorsMap singleton. This wraps that logic in a temporary scope to declare the temporary field | ||||||
|      * "found". |      * "found". | ||||||
|      */ |      */ | ||||||
|  |     // Only one supported RGB LED currently
 | ||||||
|  |     rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); | ||||||
| 
 | 
 | ||||||
| #if !defined(ARCH_PORTDUINO) | #if !defined(ARCH_PORTDUINO) | ||||||
|     auto acc_info = i2cScanner->firstAccelerometer(); |     auto acc_info = i2cScanner->firstAccelerometer(); | ||||||
|  | @ -413,6 +416,8 @@ void setup() | ||||||
|     // If we're taking on the repeater role, use flood router
 |     // If we're taking on the repeater role, use flood router
 | ||||||
|     if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) |     if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) | ||||||
|         router = new FloodingRouter(); |         router = new FloodingRouter(); | ||||||
|  |     else | ||||||
|  |         router = new ReliableRouter(); | ||||||
| 
 | 
 | ||||||
| #if HAS_BUTTON | #if HAS_BUTTON | ||||||
|     // Buttons. Moved here cause we need NodeDB to be initialized
 |     // Buttons. Moved here cause we need NodeDB to be initialized
 | ||||||
|  | @ -503,6 +508,10 @@ void setup() | ||||||
|     digitalWrite(SX126X_ANT_SW, 1); |     digitalWrite(SX126X_ANT_SW, 1); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |     // Init LockingHAL first, to use it for radio init
 | ||||||
|  | 
 | ||||||
|  |     LockingArduinoHal *RadioLibHAL = new LockingArduinoHal(SPI, spiSettings); | ||||||
|  | 
 | ||||||
|     // radio init MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)
 |     // radio init MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)
 | ||||||
| 
 | 
 | ||||||
| #if !HAS_RADIO && defined(ARCH_PORTDUINO) | #if !HAS_RADIO && defined(ARCH_PORTDUINO) | ||||||
|  | @ -520,7 +529,7 @@ void setup() | ||||||
| 
 | 
 | ||||||
| #if defined(RF95_IRQ) | #if defined(RF95_IRQ) | ||||||
|     if (!rIf) { |     if (!rIf) { | ||||||
|         rIf = new RF95Interface(RF95_NSS, RF95_IRQ, RF95_RESET, RF95_DIO1, SPI); |         rIf = new RF95Interface(RadioLibHAL, RF95_NSS, RF95_IRQ, RF95_RESET, RF95_DIO1); | ||||||
|         if (!rIf->init()) { |         if (!rIf->init()) { | ||||||
|             LOG_WARN("Failed to find RF95 radio\n"); |             LOG_WARN("Failed to find RF95 radio\n"); | ||||||
|             delete rIf; |             delete rIf; | ||||||
|  | @ -533,7 +542,7 @@ void setup() | ||||||
| 
 | 
 | ||||||
| #if defined(USE_SX1262) | #if defined(USE_SX1262) | ||||||
|     if (!rIf) { |     if (!rIf) { | ||||||
|         rIf = new SX1262Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI); |         rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); | ||||||
|         if (!rIf->init()) { |         if (!rIf->init()) { | ||||||
|             LOG_WARN("Failed to find SX1262 radio\n"); |             LOG_WARN("Failed to find SX1262 radio\n"); | ||||||
|             delete rIf; |             delete rIf; | ||||||
|  | @ -546,7 +555,7 @@ void setup() | ||||||
| 
 | 
 | ||||||
| #if defined(USE_SX1268) | #if defined(USE_SX1268) | ||||||
|     if (!rIf) { |     if (!rIf) { | ||||||
|         rIf = new SX1268Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI); |         rIf = new SX1268Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); | ||||||
|         if (!rIf->init()) { |         if (!rIf->init()) { | ||||||
|             LOG_WARN("Failed to find SX1268 radio\n"); |             LOG_WARN("Failed to find SX1268 radio\n"); | ||||||
|             delete rIf; |             delete rIf; | ||||||
|  | @ -559,7 +568,7 @@ void setup() | ||||||
| 
 | 
 | ||||||
| #if defined(USE_LLCC68) | #if defined(USE_LLCC68) | ||||||
|     if (!rIf) { |     if (!rIf) { | ||||||
|         rIf = new LLCC68Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI); |         rIf = new LLCC68Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY); | ||||||
|         if (!rIf->init()) { |         if (!rIf->init()) { | ||||||
|             LOG_WARN("Failed to find LLCC68 radio\n"); |             LOG_WARN("Failed to find LLCC68 radio\n"); | ||||||
|             delete rIf; |             delete rIf; | ||||||
|  | @ -572,7 +581,7 @@ void setup() | ||||||
| 
 | 
 | ||||||
| #if defined(USE_SX1280) | #if defined(USE_SX1280) | ||||||
|     if (!rIf) { |     if (!rIf) { | ||||||
|         rIf = new SX1280Interface(SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY, SPI); |         rIf = new SX1280Interface(RadioLibHAL, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY); | ||||||
|         if (!rIf->init()) { |         if (!rIf->init()) { | ||||||
|             LOG_WARN("Failed to find SX1280 radio\n"); |             LOG_WARN("Failed to find SX1280 radio\n"); | ||||||
|             delete rIf; |             delete rIf; | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| #include "memGet.h" | #include "memGet.h" | ||||||
| #include "mesh/generated/meshtastic/config.pb.h" | #include "mesh/generated/meshtastic/config.pb.h" | ||||||
| #include "mesh/generated/meshtastic/telemetry.pb.h" | #include "mesh/generated/meshtastic/telemetry.pb.h" | ||||||
|  | #include <SPI.h> | ||||||
| #include <map> | #include <map> | ||||||
| #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) | #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) | ||||||
| #include <SparkFun_ATECCX08a_Arduino_Library.h> | #include <SparkFun_ATECCX08a_Arduino_Library.h> | ||||||
|  | @ -26,6 +27,7 @@ extern ScanI2C::DeviceAddress cardkb_found; | ||||||
| extern uint8_t kb_model; | extern uint8_t kb_model; | ||||||
| extern ScanI2C::DeviceAddress rtc_found; | extern ScanI2C::DeviceAddress rtc_found; | ||||||
| extern ScanI2C::DeviceAddress accelerometer_found; | extern ScanI2C::DeviceAddress accelerometer_found; | ||||||
|  | extern ScanI2C::FoundDevice rgb_found; | ||||||
| 
 | 
 | ||||||
| extern bool eink_found; | extern bool eink_found; | ||||||
| extern bool pmu_found; | extern bool pmu_found; | ||||||
|  | @ -65,3 +67,6 @@ extern bool runASAP; | ||||||
| void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), clearBonds(); | void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), clearBonds(); | ||||||
| 
 | 
 | ||||||
| meshtastic_DeviceMetadata getDeviceMetadata(); | meshtastic_DeviceMetadata getDeviceMetadata(); | ||||||
|  | 
 | ||||||
|  | // FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
 | ||||||
|  | extern SPISettings spiSettings; | ||||||
|  |  | ||||||
|  | @ -2,8 +2,8 @@ | ||||||
| #include "configuration.h" | #include "configuration.h" | ||||||
| #include "error.h" | #include "error.h" | ||||||
| 
 | 
 | ||||||
| LLCC68Interface::LLCC68Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | LLCC68Interface::LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                  SPIClass &spi) |                                  RADIOLIB_PIN_TYPE busy) | ||||||
|     : SX126xInterface(cs, irq, rst, busy, spi) |     : SX126xInterface(hal, cs, irq, rst, busy) | ||||||
| { | { | ||||||
| } | } | ||||||
|  | @ -6,12 +6,13 @@ | ||||||
|  * Our adapter for LLCC68 radios |  * Our adapter for LLCC68 radios | ||||||
|  * https://www.semtech.com/products/wireless-rf/lora-core/llcc68
 |  * https://www.semtech.com/products/wireless-rf/lora-core/llcc68
 | ||||||
|  * ⚠️⚠️⚠️ |  * ⚠️⚠️⚠️ | ||||||
|  * Be aware that LLCC68 does not support Spreading Factor 12 (SF12) and will not work on the default "Long Slow" channel. |  * Be aware that LLCC68 does not support Spreading Factor 12 (SF12) and will not work on the "LongSlow" and "VLongSlow" channels. | ||||||
|  * You must change the channel if you get `Critical Error #3` with this module. |  * You must change the channel if you get `Critical Error #3` with this module. | ||||||
|  * ⚠️⚠️⚠️ |  * ⚠️⚠️⚠️ | ||||||
|  */ |  */ | ||||||
| class LLCC68Interface : public SX126xInterface<LLCC68> | class LLCC68Interface : public SX126xInterface<LLCC68> | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     LLCC68Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| }; | }; | ||||||
|  | @ -11,9 +11,9 @@ | ||||||
| 
 | 
 | ||||||
| #define POWER_DEFAULT 17 // How much power to use if the user hasn't set a power level
 | #define POWER_DEFAULT 17 // How much power to use if the user hasn't set a power level
 | ||||||
| 
 | 
 | ||||||
| RF95Interface::RF95Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | RF95Interface::RF95Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                              SPIClass &spi) |                              RADIOLIB_PIN_TYPE busy) | ||||||
|     : RadioLibInterface(cs, irq, rst, busy, spi) |     : RadioLibInterface(hal, cs, irq, rst, busy) | ||||||
| { | { | ||||||
|     LOG_WARN("RF95Interface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); |     LOG_WARN("RF95Interface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -12,7 +12,8 @@ class RF95Interface : public RadioLibInterface | ||||||
|     RadioLibRF95 *lora = NULL; // Either a RFM95 or RFM96 depending on what was stuffed on this board
 |     RadioLibRF95 *lora = NULL; // Either a RFM95 or RFM96 depending on what was stuffed on this board
 | ||||||
| 
 | 
 | ||||||
|   public: |   public: | ||||||
|     RF95Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     RF95Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                   RADIOLIB_PIN_TYPE busy); | ||||||
| 
 | 
 | ||||||
|     // TODO: Verify that this irq flag works with RFM95 / SX1276 radios the way it used to
 |     // TODO: Verify that this irq flag works with RFM95 / SX1276 radios the way it used to
 | ||||||
|     bool isIRQPending() override { return lora->getIRQFlags() & RADIOLIB_SX127X_MASK_IRQ_FLAG_VALID_HEADER; } |     bool isIRQPending() override { return lora->getIRQFlags() & RADIOLIB_SX127X_MASK_IRQ_FLAG_VALID_HEADER; } | ||||||
|  | @ -39,7 +40,7 @@ class RF95Interface : public RadioLibInterface | ||||||
|     /**
 |     /**
 | ||||||
|      * Enable a particular ISR callback glue function |      * Enable a particular ISR callback glue function | ||||||
|      */ |      */ | ||||||
|     virtual void enableInterrupt(void (*callback)()) { lora->setDio0Action(callback); } |     virtual void enableInterrupt(void (*callback)()) { lora->setDio0Action(callback, RISING); } | ||||||
| 
 | 
 | ||||||
|     /** can we detect a LoRa preamble on the current channel? */ |     /** can we detect a LoRa preamble on the current channel? */ | ||||||
|     virtual bool isChannelActive() override; |     virtual bool isChannelActive() override; | ||||||
|  |  | ||||||
|  | @ -9,26 +9,23 @@ | ||||||
| #include <pb_decode.h> | #include <pb_decode.h> | ||||||
| #include <pb_encode.h> | #include <pb_encode.h> | ||||||
| 
 | 
 | ||||||
| // FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
 | void LockingArduinoHal::spiBeginTransaction() | ||||||
| static SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); |  | ||||||
| 
 |  | ||||||
| void LockingModule::SPIbeginTransaction() |  | ||||||
| { | { | ||||||
|     spiLock->lock(); |     spiLock->lock(); | ||||||
| 
 | 
 | ||||||
|     Module::SPIbeginTransaction(); |     ArduinoHal::spiBeginTransaction(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void LockingModule::SPIendTransaction() | void LockingArduinoHal::spiEndTransaction() | ||||||
| { | { | ||||||
|     spiLock->unlock(); |     spiLock->unlock(); | ||||||
| 
 | 
 | ||||||
|     Module::SPIendTransaction(); |     ArduinoHal::spiEndTransaction(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| RadioLibInterface::RadioLibInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | RadioLibInterface::RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                      SPIClass &spi, PhysicalLayer *_iface) |                                      RADIOLIB_PIN_TYPE busy, PhysicalLayer *_iface) | ||||||
|     : NotifiedWorkerThread("RadioIf"), module(cs, irq, rst, busy, spi, spiSettings), iface(_iface) |     : NotifiedWorkerThread("RadioIf"), module(hal, cs, irq, rst, busy), iface(_iface) | ||||||
| { | { | ||||||
|     instance = this; |     instance = this; | ||||||
| #if defined(ARCH_STM32WL) && defined(USE_SX1262) | #if defined(ARCH_STM32WL) && defined(USE_SX1262) | ||||||
|  |  | ||||||
|  | @ -13,35 +13,18 @@ | ||||||
| #define INTERRUPT_ATTR | #define INTERRUPT_ATTR | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #define RADIOLIB_PIN_TYPE uint32_t | ||||||
|  | 
 | ||||||
| /**
 | /**
 | ||||||
|  * A wrapper for the RadioLib Module class, that adds mutex for SPI bus access |  * We need to override the RadioLib ArduinoHal class to add mutex protection for SPI bus access | ||||||
|  */ |  */ | ||||||
| class LockingModule : public Module | class LockingArduinoHal : public ArduinoHal | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     /*!
 |     LockingArduinoHal(SPIClass &spi, SPISettings spiSettings) : ArduinoHal(spi, spiSettings){}; | ||||||
|       \brief Extended SPI-based module constructor. |  | ||||||
| 
 | 
 | ||||||
|       \param cs Arduino pin to be used as chip select. |     void spiBeginTransaction() override; | ||||||
| 
 |     void spiEndTransaction() override; | ||||||
|       \param irq Arduino pin to be used as interrupt/GPIO. |  | ||||||
| 
 |  | ||||||
|       \param rst Arduino pin to be used as hardware reset for the module. |  | ||||||
| 
 |  | ||||||
|       \param gpio Arduino pin to be used as additional interrupt/GPIO. |  | ||||||
| 
 |  | ||||||
|       \param spi SPI interface to be used, can also use software SPI implementations. |  | ||||||
| 
 |  | ||||||
|       \param spiSettings SPI interface settings. |  | ||||||
|     */ |  | ||||||
|     LockingModule(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio, SPIClass &spi, |  | ||||||
|                   SPISettings spiSettings) |  | ||||||
|         : Module(cs, irq, rst, gpio, spi, spiSettings) |  | ||||||
|     { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     void SPIbeginTransaction() override; |  | ||||||
|     void SPIendTransaction() override; |  | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class RadioLibInterface : public RadioInterface, protected concurrency::NotifiedWorkerThread | class RadioLibInterface : public RadioInterface, protected concurrency::NotifiedWorkerThread | ||||||
|  | @ -73,7 +56,7 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified | ||||||
| 
 | 
 | ||||||
|     float currentLimit = 100; // 100mA OCP - Should be acceptable for RFM95/SX127x chipset.
 |     float currentLimit = 100; // 100mA OCP - Should be acceptable for RFM95/SX127x chipset.
 | ||||||
| 
 | 
 | ||||||
|     LockingModule module; // The HW interface to the radio
 |     Module module; // The HW interface to the radio
 | ||||||
| 
 | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * provides lowest common denominator RadioLib API |      * provides lowest common denominator RadioLib API | ||||||
|  | @ -99,8 +82,8 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified | ||||||
|     virtual void enableInterrupt(void (*)()) = 0; |     virtual void enableInterrupt(void (*)()) = 0; | ||||||
| 
 | 
 | ||||||
|   public: |   public: | ||||||
|     RadioLibInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi, |     RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                       PhysicalLayer *iface = NULL); |                       RADIOLIB_PIN_TYPE busy, PhysicalLayer *iface = NULL); | ||||||
| 
 | 
 | ||||||
|     virtual ErrorCode send(meshtastic_MeshPacket *p) override; |     virtual ErrorCode send(meshtastic_MeshPacket *p) override; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -79,5 +79,5 @@ bool RadioLibRF95::isReceiving() | ||||||
| 
 | 
 | ||||||
| uint8_t RadioLibRF95::readReg(uint8_t addr) | uint8_t RadioLibRF95::readReg(uint8_t addr) | ||||||
| { | { | ||||||
|     return _mod->SPIreadRegister(addr); |     return mod->SPIreadRegister(addr); | ||||||
| } | } | ||||||
|  | @ -2,8 +2,8 @@ | ||||||
| #include "configuration.h" | #include "configuration.h" | ||||||
| #include "error.h" | #include "error.h" | ||||||
| 
 | 
 | ||||||
| SX1262Interface::SX1262Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | SX1262Interface::SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                  SPIClass &spi) |                                  RADIOLIB_PIN_TYPE busy) | ||||||
|     : SX126xInterface(cs, irq, rst, busy, spi) |     : SX126xInterface(hal, cs, irq, rst, busy) | ||||||
| { | { | ||||||
| } | } | ||||||
|  | @ -8,5 +8,6 @@ | ||||||
| class SX1262Interface : public SX126xInterface<SX1262> | class SX1262Interface : public SX126xInterface<SX1262> | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     SX1262Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| }; | }; | ||||||
|  | @ -2,9 +2,9 @@ | ||||||
| #include "configuration.h" | #include "configuration.h" | ||||||
| #include "error.h" | #include "error.h" | ||||||
| 
 | 
 | ||||||
| SX1268Interface::SX1268Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | SX1268Interface::SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                  SPIClass &spi) |                                  RADIOLIB_PIN_TYPE busy) | ||||||
|     : SX126xInterface(cs, irq, rst, busy, spi) |     : SX126xInterface(hal, cs, irq, rst, busy) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,5 +10,6 @@ class SX1268Interface : public SX126xInterface<SX1268> | ||||||
|   public: |   public: | ||||||
|     virtual float getFreq() override; |     virtual float getFreq() override; | ||||||
| 
 | 
 | ||||||
|     SX1268Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -9,9 +9,9 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| template <typename T> | template <typename T> | ||||||
| SX126xInterface<T>::SX126xInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | SX126xInterface<T>::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                     SPIClass &spi) |                                     RADIOLIB_PIN_TYPE busy) | ||||||
|     : RadioLibInterface(cs, irq, rst, busy, spi, &lora), lora(&module) |     : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module) | ||||||
| { | { | ||||||
|     LOG_WARN("SX126xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); |     LOG_WARN("SX126xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -9,7 +9,8 @@ | ||||||
| template <class T> class SX126xInterface : public RadioLibInterface | template <class T> class SX126xInterface : public RadioLibInterface | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     SX126xInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| 
 | 
 | ||||||
|     /// Initialise the Driver transport hardware and software.
 |     /// Initialise the Driver transport hardware and software.
 | ||||||
|     /// Make sure the Driver is properly configured before calling init().
 |     /// Make sure the Driver is properly configured before calling init().
 | ||||||
|  |  | ||||||
|  | @ -2,8 +2,8 @@ | ||||||
| #include "configuration.h" | #include "configuration.h" | ||||||
| #include "error.h" | #include "error.h" | ||||||
| 
 | 
 | ||||||
| SX1280Interface::SX1280Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | SX1280Interface::SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                  SPIClass &spi) |                                  RADIOLIB_PIN_TYPE busy) | ||||||
|     : SX128xInterface(cs, irq, rst, busy, spi) |     : SX128xInterface(hal, cs, irq, rst, busy) | ||||||
| { | { | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -9,5 +9,6 @@ | ||||||
| class SX1280Interface : public SX128xInterface<SX1280> | class SX1280Interface : public SX128xInterface<SX1280> | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     SX1280Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -9,9 +9,9 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| template <typename T> | template <typename T> | ||||||
| SX128xInterface<T>::SX128xInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, | SX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|                                     SPIClass &spi) |                                     RADIOLIB_PIN_TYPE busy) | ||||||
|     : RadioLibInterface(cs, irq, rst, busy, spi, &lora), lora(&module) |     : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module) | ||||||
| { | { | ||||||
|     LOG_WARN("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); |     LOG_WARN("SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\n", cs, irq, rst, busy); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -9,7 +9,8 @@ | ||||||
| template <class T> class SX128xInterface : public RadioLibInterface | template <class T> class SX128xInterface : public RadioLibInterface | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
|     SX128xInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy, SPIClass &spi); |     SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, | ||||||
|  |                     RADIOLIB_PIN_TYPE busy); | ||||||
| 
 | 
 | ||||||
|     /// Initialise the Driver transport hardware and software.
 |     /// Initialise the Driver transport hardware and software.
 | ||||||
|     /// Make sure the Driver is properly configured before calling init().
 |     /// Make sure the Driver is properly configured before calling init().
 | ||||||
|  |  | ||||||
|  | @ -8,6 +8,17 @@ | ||||||
| #include "mesh/generated/meshtastic/rtttl.pb.h" | #include "mesh/generated/meshtastic/rtttl.pb.h" | ||||||
| #include <Arduino.h> | #include <Arduino.h> | ||||||
| 
 | 
 | ||||||
|  | #include "main.h" | ||||||
|  | 
 | ||||||
|  | #ifdef RAK4630 | ||||||
|  | #include <NCP5623.h> | ||||||
|  | NCP5623 rgb; | ||||||
|  | 
 | ||||||
|  | uint8_t red = 0; | ||||||
|  | uint8_t green = 0; | ||||||
|  | uint8_t blue = 0; | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifndef PIN_BUZZER | #ifndef PIN_BUZZER | ||||||
| #define PIN_BUZZER false | #define PIN_BUZZER false | ||||||
| #endif | #endif | ||||||
|  | @ -73,6 +84,15 @@ int32_t ExternalNotificationModule::runOnce() | ||||||
|                 millis()) { |                 millis()) { | ||||||
|                 getExternal(2) ? setExternalOff(2) : setExternalOn(2); |                 getExternal(2) ? setExternalOff(2) : setExternalOn(2); | ||||||
|             } |             } | ||||||
|  | #ifdef RAK4630 | ||||||
|  |             if (rgb_found.type == ScanI2C::NCP5623) { | ||||||
|  |                 green = (green + 50) % 255; | ||||||
|  |                 red = abs(red - green) % 255; | ||||||
|  |                 blue = abs(blue / red) % 255; | ||||||
|  | 
 | ||||||
|  |                 rgb.setColor(red, green, blue); | ||||||
|  |             } | ||||||
|  | #endif | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // now let the PWM buzzer play
 |         // now let the PWM buzzer play
 | ||||||
|  | @ -84,6 +104,7 @@ int32_t ExternalNotificationModule::runOnce() | ||||||
|                 rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone); |                 rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | 
 | ||||||
|         return 25; |         return 25; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -106,6 +127,11 @@ void ExternalNotificationModule::setExternalOn(uint8_t index) | ||||||
|         digitalWrite(output, (moduleConfig.external_notification.active ? true : false)); |         digitalWrite(output, (moduleConfig.external_notification.active ? true : false)); | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|  | #ifdef RAK4630 | ||||||
|  |     if (rgb_found.type == ScanI2C::NCP5623) { | ||||||
|  |         rgb.setColor(red, green, blue); | ||||||
|  |     } | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void ExternalNotificationModule::setExternalOff(uint8_t index) | void ExternalNotificationModule::setExternalOff(uint8_t index) | ||||||
|  | @ -126,6 +152,15 @@ void ExternalNotificationModule::setExternalOff(uint8_t index) | ||||||
|         digitalWrite(output, (moduleConfig.external_notification.active ? false : true)); |         digitalWrite(output, (moduleConfig.external_notification.active ? false : true)); | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  | #ifdef RAK4630 | ||||||
|  |     if (rgb_found.type == ScanI2C::NCP5623) { | ||||||
|  |         red = 0; | ||||||
|  |         green = 0; | ||||||
|  |         blue = 0; | ||||||
|  |         rgb.setColor(red, green, blue); | ||||||
|  |     } | ||||||
|  | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool ExternalNotificationModule::getExternal(uint8_t index) | bool ExternalNotificationModule::getExternal(uint8_t index) | ||||||
|  | @ -200,6 +235,12 @@ ExternalNotificationModule::ExternalNotificationModule() | ||||||
|                 LOG_INFO("Using Pin %i in PWM mode\n", config.device.buzzer_gpio); |                 LOG_INFO("Using Pin %i in PWM mode\n", config.device.buzzer_gpio); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | #ifdef RAK4630 | ||||||
|  |         if (rgb_found.type == ScanI2C::NCP5623) { | ||||||
|  |             rgb.begin(); | ||||||
|  |             rgb.setCurrent(10); | ||||||
|  |         } | ||||||
|  | #endif | ||||||
|     } else { |     } else { | ||||||
|         LOG_INFO("External Notification Module Disabled\n"); |         LOG_INFO("External Notification Module Disabled\n"); | ||||||
|         disable(); |         disable(); | ||||||
|  | @ -300,7 +341,6 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP | ||||||
|                     nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms; |                     nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 |  | ||||||
|             setIntervalFromNow(0); // run once so we know if we should do something
 |             setIntervalFromNow(0); // run once so we know if we should do something
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ | ||||||
| static void pinModes(uint64_t mask, uint8_t mode) | static void pinModes(uint64_t mask, uint8_t mode) | ||||||
| { | { | ||||||
|     for (uint64_t i = 0; i < NUM_GPIOS; i++) { |     for (uint64_t i = 0; i < NUM_GPIOS; i++) { | ||||||
|         if (mask & (1 << i)) { |         if (mask & (1ULL << i)) { | ||||||
|             pinMode(i, mode); |             pinMode(i, mode); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -29,13 +29,10 @@ static uint64_t digitalReads(uint64_t mask) | ||||||
| { | { | ||||||
|     uint64_t res = 0; |     uint64_t res = 0; | ||||||
| 
 | 
 | ||||||
|     // The Arduino docs show to run pinMode(). But, when testing, found it is best not to.
 |     pinModes(mask, INPUT_PULLUP); | ||||||
|     // If the line below is uncommented, read will flip the pin to the default of the second
 |  | ||||||
|     // argument in pinModes(), which will make the read turn the PIN "on".
 |  | ||||||
|     // pinModes(mask, INPUT_PULLUP);
 |  | ||||||
| 
 | 
 | ||||||
|     for (uint64_t i = 0; i < NUM_GPIOS; i++) { |     for (uint64_t i = 0; i < NUM_GPIOS; i++) { | ||||||
|         uint64_t m = 1 << i; |         uint64_t m = 1ULL << i; | ||||||
|         if (mask & m) { |         if (mask & m) { | ||||||
|             if (digitalRead(i)) { |             if (digitalRead(i)) { | ||||||
|                 res |= m; |                 res |= m; | ||||||
|  | @ -64,7 +61,7 @@ bool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &r | ||||||
|             screen->print("Write GPIOs\n"); |             screen->print("Write GPIOs\n"); | ||||||
| 
 | 
 | ||||||
|             for (uint8_t i = 0; i < NUM_GPIOS; i++) { |             for (uint8_t i = 0; i < NUM_GPIOS; i++) { | ||||||
|                 uint64_t mask = 1 << i; |                 uint64_t mask = 1ULL << i; | ||||||
|                 if (p.gpio_mask & mask) { |                 if (p.gpio_mask & mask) { | ||||||
|                     digitalWrite(i, (p.gpio_value & mask) ? 1 : 0); |                     digitalWrite(i, (p.gpio_value & mask) ? 1 : 0); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ int32_t BME680Sensor::runOnce() | ||||||
|         return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; |         return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; | ||||||
|     } |     } | ||||||
|     bme680.begin(nodeTelemetrySensorsMap[sensorType], Wire); |     bme680.begin(nodeTelemetrySensorsMap[sensorType], Wire); | ||||||
|     if (bme680.bsecStatus == BSEC_OK) { |     if (bme680.status == BSEC_OK) { | ||||||
|         bme680.setConfig(bsec_config_iaq); |         bme680.setConfig(Default_H2S_NonH2S_config); | ||||||
|         loadState(); |         loadState(); | ||||||
|         bme680.updateSubscription(sensorList, 13, BSEC_SAMPLE_RATE_LP); |         bme680.updateSubscription(sensorList, 13, BSEC_SAMPLE_RATE_LP); | ||||||
|         status = 1; |         status = 1; | ||||||
|  | @ -30,10 +30,12 @@ void BME680Sensor::setup() {} | ||||||
| bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement) | bool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement) | ||||||
| { | { | ||||||
|     bme680.run(); |     bme680.run(); | ||||||
|     measurement->variant.environment_metrics.temperature = bme680.temperature; | 
 | ||||||
|     measurement->variant.environment_metrics.relative_humidity = bme680.humidity; |     measurement->variant.environment_metrics.temperature = bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE).signal; | ||||||
|     measurement->variant.environment_metrics.barometric_pressure = bme680.pressure / 100.0F; |     measurement->variant.environment_metrics.relative_humidity = | ||||||
|     measurement->variant.environment_metrics.gas_resistance = bme680.gasResistance / 1000.0; |         bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY).signal; | ||||||
|  |     measurement->variant.environment_metrics.barometric_pressure = bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal / 100.0F; | ||||||
|  |     measurement->variant.environment_metrics.gas_resistance = bme680.getData(BSEC_OUTPUT_RAW_GAS).signal / 1000.0; | ||||||
|     // Check if we need to save state to filesystem (every STATE_SAVE_PERIOD ms)
 |     // Check if we need to save state to filesystem (every STATE_SAVE_PERIOD ms)
 | ||||||
|     updateState(); |     updateState(); | ||||||
|     return true; |     return true; | ||||||
|  | @ -62,12 +64,13 @@ void BME680Sensor::updateState() | ||||||
|     bool update = false; |     bool update = false; | ||||||
|     if (stateUpdateCounter == 0) { |     if (stateUpdateCounter == 0) { | ||||||
|         /* First state update when IAQ accuracy is >= 3 */ |         /* First state update when IAQ accuracy is >= 3 */ | ||||||
|         if (bme680.iaqAccuracy >= 3) { |         accuracy = bme680.getData(BSEC_OUTPUT_IAQ).accuracy; | ||||||
|             LOG_DEBUG("%s state update IAQ accuracy %u >= 3\n", sensorName, bme680.iaqAccuracy); |         if (accuracy >= 3) { | ||||||
|  |             LOG_DEBUG("%s state update IAQ accuracy %u >= 3\n", sensorName, accuracy); | ||||||
|             update = true; |             update = true; | ||||||
|             stateUpdateCounter++; |             stateUpdateCounter++; | ||||||
|         } else { |         } else { | ||||||
|             LOG_DEBUG("%s not updated, IAQ accuracy is %u >= 3\n", sensorName, bme680.iaqAccuracy); |             LOG_DEBUG("%s not updated, IAQ accuracy is %u >= 3\n", sensorName, accuracy); | ||||||
|         } |         } | ||||||
|     } else { |     } else { | ||||||
|         /* Update every STATE_SAVE_PERIOD minutes */ |         /* Update every STATE_SAVE_PERIOD minutes */ | ||||||
|  |  | ||||||
|  | @ -1,22 +1,21 @@ | ||||||
| #include "../mesh/generated/meshtastic/telemetry.pb.h" | #include "../mesh/generated/meshtastic/telemetry.pb.h" | ||||||
| #include "TelemetrySensor.h" | #include "TelemetrySensor.h" | ||||||
| #include <bsec.h> | #include <bsec2.h> | ||||||
| 
 | 
 | ||||||
| #define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis()
 | #define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis()
 | ||||||
| 
 | 
 | ||||||
| const uint8_t bsec_config_iaq[] = { | #include "config/Default_H2S_NonH2S/Default_H2S_NonH2S.h" | ||||||
| #include <config/generic_33v_3s_4d/bsec_iaq.txt> |  | ||||||
| }; |  | ||||||
| 
 | 
 | ||||||
| class BME680Sensor : virtual public TelemetrySensor | class BME680Sensor : virtual public TelemetrySensor | ||||||
| { | { | ||||||
|   private: |   private: | ||||||
|     Bsec bme680; |     Bsec2 bme680; | ||||||
| 
 | 
 | ||||||
|   protected: |   protected: | ||||||
|     virtual void setup() override; |     virtual void setup() override; | ||||||
|     const char *bsecConfigFileName = "/prefs/bsec.dat"; |     const char *bsecConfigFileName = "/prefs/bsec.dat"; | ||||||
|     uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0}; |     uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0}; | ||||||
|  |     uint8_t accuracy = 0; | ||||||
|     uint16_t stateUpdateCounter = 0; |     uint16_t stateUpdateCounter = 0; | ||||||
|     bsec_virtual_sensor_t sensorList[13] = {BSEC_OUTPUT_IAQ, |     bsec_virtual_sensor_t sensorList[13] = {BSEC_OUTPUT_IAQ, | ||||||
|                                             BSEC_OUTPUT_STATIC_IAQ, |                                             BSEC_OUTPUT_STATIC_IAQ, | ||||||
|  |  | ||||||
|  | @ -309,8 +309,13 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r | ||||||
|     // assert(esp_sleep_enable_uart_wakeup(0) == ESP_OK);
 |     // assert(esp_sleep_enable_uart_wakeup(0) == ESP_OK);
 | ||||||
| #endif | #endif | ||||||
| #ifdef BUTTON_PIN | #ifdef BUTTON_PIN | ||||||
|  | #if SOC_PM_SUPPORT_EXT_WAKEUP | ||||||
|     esp_sleep_enable_ext0_wakeup((gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN), |     esp_sleep_enable_ext0_wakeup((gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN), | ||||||
|                                  LOW); // when user presses, this button goes low
 |                                  LOW); // when user presses, this button goes low
 | ||||||
|  | #else | ||||||
|  |     esp_sleep_enable_gpio_wakeup(); | ||||||
|  |     gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); | ||||||
|  | #endif | ||||||
| #endif | #endif | ||||||
| #if defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) | #if defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC) | ||||||
|     gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); // SX126x/SX128x interrupt, active high
 |     gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); // SX126x/SX128x interrupt, active high
 | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ extends = nrf52840_base | ||||||
| board = nordic_pca10059 | board = nordic_pca10059 | ||||||
| board_level = extra | board_level = extra | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v1 -D NORDIC_PCA10059 | build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v1 -D NORDIC_PCA10059 | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-pca10059-v1> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-pca10059-v1> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ board_level = extra | ||||||
| extends = nrf52840_base | extends = nrf52840_base | ||||||
| board = nordic_pca10059 | board = nordic_pca10059 | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_eink -D PRIVATE_HW | build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_eink -D PRIVATE_HW | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
|   -D PIN_EINK_EN |   -D PIN_EINK_EN | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_eink> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_eink> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ board_level = extra | ||||||
| extends = nrf52840_base | extends = nrf52840_base | ||||||
| board = nordic_pca10059 | board = nordic_pca10059 | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_oled -D PRIVATE_HW | build_flags = ${nrf52840_base.build_flags} -Ivariants/MakePython_nRF52840_oled -D PRIVATE_HW | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_oled> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MakePython_nRF52840_oled> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| extends = esp32c3_base | extends = esp32c3_base | ||||||
| board = esp32-c3-devkitm-1 | board = esp32-c3-devkitm-1 | ||||||
| board_level = extra | board_level = extra | ||||||
| build_flags =  | build_flags = ${esp32c3_base.build_flags} | ||||||
|   ${esp32_base.build_flags} |  | ||||||
|   -D PRIVATE_HW |   -D PRIVATE_HW | ||||||
|   -I variants/ai-c3 |   -I variants/ai-c3 | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | @ -1,26 +1,30 @@ | ||||||
| // #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
 | #define SDA 0 | ||||||
|  | #define SCL 1 | ||||||
|  | #define I2C_SDA SDA | ||||||
|  | #define I2C_SCL SCL | ||||||
| 
 | 
 | ||||||
| #define I2C_SDA 8 | #define BUTTON_PIN 9 // BOOT button
 | ||||||
| #define I2C_SCL 9 | #define LED_PIN 30   // RGB LED
 | ||||||
| 
 |  | ||||||
| #define BUTTON_PIN 0 |  | ||||||
| 
 | 
 | ||||||
| #define USE_RF95 | #define USE_RF95 | ||||||
| #undef RF95_SCK |  | ||||||
| #define RF95_SCK 4 | #define RF95_SCK 4 | ||||||
| #undef RF95_MISO |  | ||||||
| #define RF95_MISO 5 | #define RF95_MISO 5 | ||||||
| #undef RF95_MOSI |  | ||||||
| #define RF95_MOSI 6 | #define RF95_MOSI 6 | ||||||
| #undef RF95_NSS |  | ||||||
| #define RF95_NSS 7 | #define RF95_NSS 7 | ||||||
| 
 | 
 | ||||||
| #define LORA_DIO0 10 // a No connect on the SX1262 module
 | #define LORA_DIO0 10 | ||||||
| #define LORA_DIO1 3  // a No connect on the SX1262 module
 | #define LORA_DIO1 3 | ||||||
| #define LORA_RESET 2 | #define LORA_RESET 2 | ||||||
| 
 | 
 | ||||||
|  | // WaveShare Core1262-868M
 | ||||||
|  | // https://www.waveshare.com/wiki/Core1262-868M
 | ||||||
|  | #define USE_SX1262 | ||||||
|  | #define SX126X_CS RF95_NSS | ||||||
|  | #define SX126X_DIO1 LORA_DIO1 | ||||||
|  | #define SX126X_BUSY 10 | ||||||
|  | #define SX126X_RESET LORA_RESET | ||||||
|  | #define SX126X_E22 // use DIO2 as RF switch
 | ||||||
|  | 
 | ||||||
|  | #define HAS_GPS 0 | ||||||
| #undef GPS_RX_PIN | #undef GPS_RX_PIN | ||||||
| #undef GPS_TX_PIN | #undef GPS_TX_PIN | ||||||
| 
 |  | ||||||
| #define HAS_SCREEN 0 |  | ||||||
| #define HAS_GPS 0 |  | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ build_flags = | ||||||
|   -I variants/diy/v1 |   -I variants/diy/v1 | ||||||
| 
 | 
 | ||||||
| ; Meshtastic DIY v1.1 new schematic based on ESP32-WROOM-32 & SX1262/SX1268 modules | ; Meshtastic DIY v1.1 new schematic based on ESP32-WROOM-32 & SX1262/SX1268 modules | ||||||
| [env:meshtastic-diy-v1.1] | [env:meshtastic-diy-v1_1] | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = esp32doit-devkit-v1 | board = esp32doit-devkit-v1 | ||||||
| board_level = extra | board_level = extra | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ extends = nrf52840_base | ||||||
| board = adafruit_feather_nrf52840 | board = adafruit_feather_nrf52840 | ||||||
| board_level = extra | board_level = extra | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/feather_diy -Dfeather_diy | build_flags = ${nrf52840_base.build_flags} -Ivariants/feather_diy -Dfeather_diy | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/feather_diy> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/feather_diy> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| [env:heltec-v2.1] | [env:heltec-v2_1] | ||||||
| ;build_type = debug ; to make it possible to step through our jtag debugger  | ;build_type = debug ; to make it possible to step through our jtag debugger  | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = heltec_wifi_lora_32_V2 | board = heltec_wifi_lora_32_V2 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| [env:heltec-v2.0] | [env:heltec-v2_0] | ||||||
| ;build_type = debug ; to make it possible to step through our jtag debugger  | ;build_type = debug ; to make it possible to step through our jtag debugger  | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = heltec_wifi_lora_32_V2 | board = heltec_wifi_lora_32_V2 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,6 @@ | ||||||
|  | #define I2C_SCL 47 | ||||||
|  | #define I2C_SDA 48 | ||||||
|  | 
 | ||||||
| #define LED_PIN LED | #define LED_PIN LED | ||||||
| 
 | 
 | ||||||
| #define HAS_SCREEN 0 | #define HAS_SCREEN 0 | ||||||
|  |  | ||||||
|  | @ -15,6 +15,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v1 | ||||||
|   -DTFT_DC=ST7735_RS |   -DTFT_DC=ST7735_RS | ||||||
|   -DTFT_RST=ST7735_RESET |   -DTFT_RST=ST7735_RESET | ||||||
|   -DSPI_FREQUENCY=27000000 |   -DSPI_FREQUENCY=27000000 | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v1> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -17,6 +17,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/lora_relay_v2 | ||||||
|   -DSPI_FREQUENCY=27000000 |   -DSPI_FREQUENCY=27000000 | ||||||
|   -DTFT_WR=ST7735_SDA |   -DTFT_WR=ST7735_SDA | ||||||
|   -DTFT_SCLK=ST7735_SCK |   -DTFT_SCLK=ST7735_SCK | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v2> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/lora_relay_v2> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -5,4 +5,5 @@ extends = nrf52840_base | ||||||
| board = nrf52840_dk_modified | board = nrf52840_dk_modified | ||||||
| # add our variants files to the include and src paths | # add our variants files to the include and src paths | ||||||
| build_flags = ${nrf52_base.build_flags} -Ivariants/pca10056-rc-clock | build_flags = ${nrf52_base.build_flags} -Ivariants/pca10056-rc-clock | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/pca10056-rc-clock> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/pca10056-rc-clock> | ||||||
|  | @ -3,12 +3,14 @@ | ||||||
| extends = nrf52840_base | extends = nrf52840_base | ||||||
| board = wiscore_rak4631 | board = wiscore_rak4631 | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631 | build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631 | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<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} | ||||||
|   melopero/Melopero RV3028@^1.1.0 |   melopero/Melopero RV3028@^1.1.0 | ||||||
|   https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 |   https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2 | ||||||
|  |   rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 | ||||||
| debug_tool = jlink | debug_tool = jlink | ||||||
| ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ||||||
| ;upload_protocol = jlink | ;upload_protocol = jlink | ||||||
|  | @ -3,11 +3,13 @@ | ||||||
| extends = nrf52840_base | extends = nrf52840_base | ||||||
| board = wiscore_rak4631 | board = wiscore_rak4631 | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 | build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|   zinggjm/GxEPD2@^1.4.9 |   zinggjm/GxEPD2@^1.4.9 | ||||||
|   melopero/Melopero RV3028@^1.1.0 |   melopero/Melopero RV3028@^1.1.0 | ||||||
|  |   rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 | ||||||
| debug_tool = jlink | debug_tool = jlink | ||||||
| ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ||||||
| ;upload_protocol = jlink | ;upload_protocol = jlink | ||||||
|  | @ -4,12 +4,14 @@ board_level = extra | ||||||
| extends = nrf52840_base | extends = nrf52840_base | ||||||
| board = wiscore_rak4631 | board = wiscore_rak4631 | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 | build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631_epaper -D RAK_4631 | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
|   -D PIN_EINK_EN=34 |   -D PIN_EINK_EN=34 | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper_onrxtx> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631_epaper_onrxtx> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|   zinggjm/GxEPD2@^1.5.1 |   zinggjm/GxEPD2@^1.5.1 | ||||||
|   melopero/Melopero RV3028@^1.1.0 |   melopero/Melopero RV3028@^1.1.0 | ||||||
|  |   rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 | ||||||
| debug_tool = jlink | debug_tool = jlink | ||||||
| ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) | ||||||
| ;upload_protocol = jlink | ;upload_protocol = jlink | ||||||
|  |  | ||||||
|  | @ -8,7 +8,8 @@ debug_tool = jlink | ||||||
| # define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens | # define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens | ||||||
| # -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30 | # -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30 | ||||||
| # add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. | # add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. | ||||||
| build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo  | build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo | ||||||
|  |   -L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard" | ||||||
| build_src_filter = ${nrf52_base.build_src_filter} +<../variants/t-echo> | build_src_filter = ${nrf52_base.build_src_filter} +<../variants/t-echo> | ||||||
| lib_deps =  | lib_deps =  | ||||||
|   ${nrf52840_base.lib_deps} |   ${nrf52840_base.lib_deps} | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| ; The original TBEAM board without the AXP power chip and a few other changes | ; The original TBEAM board without the AXP power chip and a few other changes | ||||||
| [env:tbeam0.7] | [env:tbeam0_7] | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = ttgo-t-beam | board = ttgo-t-beam | ||||||
| board_level = extra | board_level = extra | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| [env:tlora-v2-1-1.6] | [env:tlora-v2-1-1_6] | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = ttgo-lora32-v21 | board = ttgo-lora32-v21 | ||||||
| build_flags =  | build_flags =  | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| [env:tlora-v2-1-1.8] | [env:tlora-v2-1-1_8] | ||||||
| extends = esp32_base | extends = esp32_base | ||||||
| board = ttgo-lora32-v21 | board = ttgo-lora32-v21 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| [VERSION]   | [VERSION]   | ||||||
| major = 2 | major = 2 | ||||||
| minor = 1 | minor = 1 | ||||||
| build = 11 | build = 12 | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Ben Meadors
						Ben Meadors