fix: preserve board features in full companion profiles
This commit is contained in:
1 parent
6510e00e39
commit
ce7e65314d
7 files changed
+74
-4
No files matched your search
@@ -9,6 +9,69 @@ fail() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Full targets are synthesized from an ordinary transport environment. Check
|
||||
# the resolved PlatformIO configuration so board-specific display, GPS, input,
|
||||
# and BLE constraints cannot silently disappear through that inheritance.
|
||||
pio project config --json-output | python3 -c '
|
||||
import json
|
||||
import sys
|
||||
|
||||
sections = {section: dict(options) for section, options in json.load(sys.stdin)}
|
||||
|
||||
def option_text(env_name, option_name):
|
||||
section = sections.get(f"env:{env_name}")
|
||||
if section is None:
|
||||
raise SystemExit(f"test_build_profiles: missing PlatformIO environment {env_name}")
|
||||
value = section.get(option_name, [])
|
||||
values = value if isinstance(value, list) else [value]
|
||||
return "\n".join(str(item) for item in values)
|
||||
|
||||
def require(env_name, option_name, needle):
|
||||
if needle not in option_text(env_name, option_name):
|
||||
raise SystemExit(
|
||||
f"test_build_profiles: {env_name} {option_name} lost {needle}"
|
||||
)
|
||||
|
||||
def reject(env_name, option_name, needle):
|
||||
if needle in option_text(env_name, option_name):
|
||||
raise SystemExit(
|
||||
f"test_build_profiles: {env_name} {option_name} unexpectedly contains {needle}"
|
||||
)
|
||||
|
||||
xiao_wifi = "Xiao_S3_WIO_companion_radio_wifi"
|
||||
require(xiao_wifi, "build_flags", "DISPLAY_CLASS=SSD1306Display")
|
||||
require(xiao_wifi, "build_src_filter", "helpers/ui/SSD1306Display.cpp")
|
||||
require(xiao_wifi, "build_src_filter", "examples/companion_radio/ui-new")
|
||||
require(xiao_wifi, "lib_deps", "Adafruit SSD1306")
|
||||
reject(xiao_wifi, "build_src_filter", "helpers/ui/NullDisplayDriver.cpp")
|
||||
|
||||
m8_usb = "ThinkNode_M8_companion_radio_usb"
|
||||
require(m8_usb, "build_flags", "PIN_BUZZER=33")
|
||||
reject(m8_usb, "build_flags", "PIN_BUZZER=6")
|
||||
require(m8_usb, "build_flags", "ENV_INCLUDE_GPS=1")
|
||||
require(m8_usb, "lib_deps", "GxEPD2 @ 1.6.9")
|
||||
reject(m8_usb, "lib_deps", "GxEPD2 @ 1.6.2")
|
||||
|
||||
require("ThinkNode_M5_companion_radio_wifi", "build_flags", "UI_RECENT_LIST_SIZE=9")
|
||||
|
||||
for env_name in (
|
||||
"t1000e_companion_radio_usb",
|
||||
"MeshTracker_X1_companion_radio_usb",
|
||||
"ThinkNode_M3_companion_radio_usb",
|
||||
):
|
||||
require(env_name, "build_flags", "BLE_TX_POWER=0")
|
||||
|
||||
for env_name in (
|
||||
"WioTrackerL1_companion_radio_usb",
|
||||
"WioTrackerL1_companion_radio_ble",
|
||||
):
|
||||
require(env_name, "build_flags", "UI_NO_HIBERNATE")
|
||||
|
||||
rak_usb = "RAK_3401_companion_radio_usb"
|
||||
require(rak_usb, "build_flags", "RAK_BOARD")
|
||||
require(rak_usb, "build_flags", "FORCE_GPS_ALIVE")
|
||||
'
|
||||
|
||||
# Synthetic inventory: one ESP32 target qualified for expanded Full and one
|
||||
# nRF52 target which must attempt complete LoRa OTA in its current partition.
|
||||
SUPPORTED_PIO_ENVS=(
|
||||
|
||||
@@ -78,6 +78,7 @@ build_flags = ${MeshTracker_X1.build_flags}
|
||||
-D QSPIFLASH=1
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D BLE_TX_POWER=0
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
|
||||
@@ -77,6 +77,7 @@ build_flags = ${t1000-e.build_flags}
|
||||
-I examples/companion_radio/ui-orig
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D BLE_TX_POWER=0
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
|
||||
@@ -78,6 +78,7 @@ build_flags = ${ThinkNode_M3.build_flags}
|
||||
-I examples/companion_radio/ui-orig
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D BLE_TX_POWER=0
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
|
||||
@@ -29,6 +29,7 @@ build_flags = ${esp32_base.build_flags}
|
||||
-D EINK_Y_OFFSET=10
|
||||
-D BACKLIGHT_BTN=PIN_BUTTON2
|
||||
-D AUTO_OFF_MILLIS=0
|
||||
-D UI_RECENT_LIST_SIZE=9
|
||||
-D DISABLE_DIAGNOSTIC_OUTPUT
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=3.3
|
||||
@@ -151,7 +152,6 @@ build_flags =
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D BLE_PIN_CODE=123456
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D UI_RECENT_LIST_SIZE=9
|
||||
; -D BLE_DEBUG_LOGGING=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D GPS_NMEA_DEBUG
|
||||
|
||||
@@ -138,8 +138,9 @@ build_flags =
|
||||
-D BACKLIGHT_BTN=PIN_BUTTON2
|
||||
-D AUTO_OFF_MILLIS=0
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D PIN_BUZZER=6
|
||||
-D PIN_BUZZER=33
|
||||
-D AUTO_SHUTDOWN_MILLIVOLTS=3300
|
||||
-D ENV_INCLUDE_GPS=1
|
||||
-D ENABLE_USB_INTERFACE
|
||||
build_src_filter = ${ThinkNode_M8.build_src_filter}
|
||||
+<helpers/ui/GxEPDDisplay.cpp>
|
||||
@@ -152,7 +153,7 @@ build_src_filter = ${ThinkNode_M8.build_src_filter}
|
||||
lib_deps =
|
||||
${ThinkNode_M8.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
zinggjm/GxEPD2 @ 1.6.2
|
||||
zinggjm/GxEPD2 @ 1.6.9
|
||||
bakercp/CRC32 @ ^2.0.0
|
||||
end2endzone/NonBlockingRTTTL@^1.3.0
|
||||
|
||||
|
||||
@@ -282,16 +282,18 @@ lib_deps =
|
||||
[env:Xiao_S3_WIO_companion_radio_wifi]
|
||||
extends = Xiao_S3_WIO
|
||||
build_src_filter = ${Xiao_S3_WIO.build_src_filter}
|
||||
+<helpers/ui/NullDisplayDriver.cpp>
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<helpers/esp32/*.cpp>
|
||||
+<helpers/ui/MomentaryButton.cpp>
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
+<../examples/companion_radio/ui-new/*.cpp>
|
||||
build_flags =
|
||||
${Xiao_S3_WIO.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D WIFI_DEBUG_LOGGING=1
|
||||
-D WIFI_SSID='"myssid"'
|
||||
-D WIFI_PWD='"password"'
|
||||
@@ -301,6 +303,7 @@ build_flags =
|
||||
lib_deps =
|
||||
${Xiao_S3_WIO.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
adafruit/Adafruit SSD1306 @ ^2.5.13
|
||||
|
||||
[env:Xiao_S3_WIO_companion_radio_full]
|
||||
extends = env:Xiao_S3_WIO_companion_radio_wifi
|
||||
|
||||
Reference in new issue
Block a user