feat(kiss): enable fast profile scanning on Station G3

This commit is contained in:
mikecarper committed 2026-09-20 08:16:00 -07:00
1 parent 7657840d38
commit a37caf1507
3 files changed
+27 -6

No files matched your search

+6 -5
View File
@@ -476,11 +476,12 @@ tested redundant standby/IRQ/buffer/packet setup and SPI transfer changes.
Its fastest candidate measured 0.535 ms mean on XIAO but 8.203 ms on the
Indicator, whose radio GPIOs go through an I2C expander. The validated production
implementation now opts XIAO S3 WIO and Indicator LoRa into buffered 8 MHz SPI
and a guarded fast-RX state machine. The `heltec_v4_kiss_modem` target uses the
same guarded path only for KISS dual-profile scanning; its normal V4 roles keep
their established HAL/timing policy. That host-powered KISS target uses the
existing V4 160 MHz role override, but still needs an exact-image hardware
timing check before its nominal 600 µs target is claimed. It skips redundant
and a guarded fast-RX state machine. The `heltec_v4_kiss_modem` and
`Station_G3_ESP32_kiss_modem` targets use the same guarded path only for KISS
dual-profile scanning; their normal board roles keep their established
HAL/timing policy. V4 uses its existing 160 MHz role override and Station G3
uses its base 240 MHz setting, but both still need an exact-image hardware
timing check before a nominal 600 µs target is claimed. It skips redundant
standby, IRQ mapping,
buffer-base writes and modem queries only during an owned continuous RX-to-RX
retune. Preamble/packet parameters (including the IQ workaround), stale-IRQ
+8
View File
@@ -171,6 +171,14 @@ build_flags =
extends = Station_G3_ESP32
build_src_filter = ${Station_G3_ESP32.build_src_filter}
+<../examples/kiss_modem/>
build_flags =
${Station_G3_ESP32.build_flags}
; KISS profile switching is performed locally by the SX1262 scanner, not
; through serial host round trips. Keep this fast-RX/buffered-SPI opt-in
; isolated to the host-powered modem image.
-D MC_SX1262_FAST_PROFILE_SWITCH=1
-D MC_SX1262_BUFFERED_RADIO_HAL=1
-D MC_SX1262_SPI_HZ=8000000
[env:Station_G3_ESP32_repeater_observer_mqtt]
extends = Station_G3_ESP32
+13 -1
View File
@@ -1,11 +1,23 @@
#include <Arduino.h>
#include "target.h"
// The normal Station G3 roles retain the established RadioLib Arduino HAL.
// The KISS modem can opt into buffered SPI for its on-board dual-profile RX
// scanner without changing the regular Station firmware.
#if defined(MC_SX1262_BUFFERED_RADIO_HAL) && MC_SX1262_BUFFERED_RADIO_HAL
#include <helpers/radiolib/ESP32BufferedRadioHal.h>
#endif
StationG3Board board;
#if defined(P_LORA_SCLK)
static SPIClass spi;
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
#if defined(MC_SX1262_BUFFERED_RADIO_HAL) && MC_SX1262_BUFFERED_RADIO_HAL
static ESP32BufferedRadioHal radio_hal(spi);
RADIO_CLASS radio = new Module(&radio_hal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
#else
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
#endif
#else
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
#endif