Replace JP_STRICT build flag with runtime frequency detection

JP LBT mode now activates automatically based on operating frequency:
- CH25: 920.800MHz
- CH26: 921.000MHz
- CH27: 921.200MHz (ARIB STD-T108, 200kHz grid)

Changes:
- Add isJapanMode() to RadioLibWrapper using getFreqMHz()
- Add getFreqMHz() to CustomSX1262Wrapper and CustomLR1110Wrapper
- Remove #ifdef JP_STRICT throughout, replaced by isJapanMode()
- Remove -D JP_STRICT build flag from platformio.ini
- MAX_TEXT_LEN dynamically determined by CR at runtime via getMaxTextLen()

No build flags required: JP compliance activates automatically
when device is configured to Japan 3 frequencies.
This commit is contained in:
jirogit 2026-03-27 23:42:37 -07:00
parent 73ec37657c
commit c725b82e77
8 changed files with 51 additions and 52 deletions

View file

@ -25,8 +25,6 @@ build_flags = ${nrf52_base.build_flags}
-D PIN_BUZZER=21
-D PIN_BOARD_SDA=PIN_WIRE_SDA
-D PIN_BOARD_SCL=PIN_WIRE_SCL
-D JP_STRICT
-D LORA_CR=5
build_src_filter = ${nrf52_base.build_src_filter}
+<../variants/rak_wismesh_tag>
+<helpers/ui/MomentaryButton.cpp>

View file

@ -16,8 +16,6 @@ build_flags = ${nrf52_base.build_flags}
-D SX126X_RX_BOOSTED_GAIN=1
-D PIN_OLED_RESET=-1
-D GPS_BAUD_RATE=9600
-D JP_STRICT
-D LORA_CR=5
build_src_filter = ${nrf52_base.build_src_filter}
+<WioTrackerL1Board.cpp>
+<../variants/wio-tracker-l1>