- Add test/test_kiss.cpp: Unit tests for KISS protocol encoder/decoder Tests: frame decoding with/without escape sequences, port extraction, round-trip encoding/decoding, signal quality encoding, buffer overflow handling - Add test/test_commands.cpp: Unit tests for config command parsing Tests: big-endian encoding/decoding, frequency frame parsing, type byte decoding - Configure PlatformIO native test environment with GoogleTest framework - Tests currently build but require linking stubs for full integration Note: Full end-to-end testing requires mocking Serial I/O and radio functions, which would be handled by integration tests on actual hardware or with a more sophisticated test harness (e.g., CMake + GoogleTest).
72 lines
2.3 KiB
INI
72 lines
2.3 KiB
INI
; Root PlatformIO configuration for LoRa KISS modem (20 boards)
|
|
; Board-specific environments are in hardware/<vendor>/<board>/platformio.ini
|
|
; SoC shared settings are in soc/<soc>/platformio.ini
|
|
|
|
[platformio]
|
|
default_envs =
|
|
heltec_v3
|
|
rak_rak4631
|
|
heltec_v2
|
|
|
|
extra_configs =
|
|
soc/esp32/platformio.ini
|
|
soc/esp32s3/platformio.ini
|
|
soc/nrf52/platformio.ini
|
|
hardware/heltec/t114/platformio.ini
|
|
hardware/heltec/ct62/platformio.ini
|
|
hardware/heltec/e213/platformio.ini
|
|
hardware/heltec/e290/platformio.ini
|
|
hardware/heltec/mesh_solar/platformio.ini
|
|
hardware/heltec/t190/platformio.ini
|
|
hardware/heltec/tracker/platformio.ini
|
|
hardware/heltec/tracker_v2/platformio.ini
|
|
hardware/heltec/v2/platformio.ini
|
|
hardware/heltec/v3/platformio.ini
|
|
hardware/heltec/v4/platformio.ini
|
|
hardware/lilygo/t_beam_1w/platformio.ini
|
|
hardware/lilygo/t_beam_sx1262/platformio.ini
|
|
hardware/lilygo/t_beam_sx1276/platformio.ini
|
|
hardware/lilygo/t_beam_supreme/platformio.ini
|
|
hardware/seeed/xiao_s3_wio_sx1262/platformio.ini
|
|
hardware/rak/rak11310/platformio.ini
|
|
hardware/rak/rak3112/platformio.ini
|
|
hardware/rak/rak3401/platformio.ini
|
|
hardware/rak/rak3x72/platformio.ini
|
|
hardware/rak/rak4631/platformio.ini
|
|
|
|
; ------------------------------------------------------------------
|
|
; Base environment — all board envs extend this.
|
|
; Provides: RadioLib dependency, default LoRa parameters.
|
|
; ------------------------------------------------------------------
|
|
[env:base]
|
|
lib_deps =
|
|
jgromes/RadioLib@^6.6.0
|
|
|
|
monitor_speed = 115200
|
|
|
|
build_flags =
|
|
; Treat warnings as errors in our code, but not in third-party
|
|
-Wall -Werror -Wno-error=unused-function
|
|
; C99 for KISS implementation
|
|
-std=c99
|
|
; Default LoRa radio parameters — override per-board as needed
|
|
-DLORA_FREQ_KHZ=868000UL
|
|
-DLORA_BW_HZ=125000UL
|
|
-DLORA_SF=7
|
|
-DLORA_CR=5
|
|
-DLORA_POWER_DBM=14
|
|
-DLORA_SYNCWORD=0x12
|
|
; KISS serial baud rate
|
|
-DKISS_BAUD=115200
|
|
|
|
; ------------------------------------------------------------------
|
|
; Native test environment — run unit tests on host
|
|
; ------------------------------------------------------------------
|
|
[env:test]
|
|
platform = native
|
|
test_framework = googletest
|
|
test_build_src = yes
|
|
build_flags =
|
|
-std=c99
|
|
build_src_filter = +<*> -<main.cpp> -<radio.cpp>
|