Add SenseCAP Indicator N16R2 profile
This commit is contained in:
1 parent
6a52d132b7
commit
8f413b0610
9 files changed
+108
-9
No files matched your search
@@ -339,6 +339,7 @@ Heltec_E290_companion_usb_ble|Heltec_E290_companion_radio_full|Heltec_E290_compa
|
||||
Heltec_T190_companion_radio_usb_ble_|Heltec_T190_companion_radio_full_|Heltec_T190_companion_radio_usb_ble_
|
||||
SenseCapIndicator-ESPNow_comp_radio_usb|SenseCapIndicator-ESPNow_companion_radio_full|SenseCapIndicator-ESPNow_comp_radio_usb
|
||||
SenseCapIndicator-LoRa_comp_radio_usb_wifi|SenseCapIndicator-LoRa_companion_radio_full|SenseCapIndicator-LoRa_comp_radio_usb_wifi
|
||||
SenseCapIndicator-LoRa-N16R2_comp_radio_usb_wifi|SenseCapIndicator-LoRa-N16R2_companion_radio_full|SenseCapIndicator-LoRa-N16R2_comp_radio_usb_wifi
|
||||
FULL_COMPANION_SPECS
|
||||
|
||||
# The Full overlay, not the historical transport used as its build base, owns
|
||||
@@ -378,6 +379,13 @@ for full_env in "${SUPPORTED_PIO_ENVS[@]}"; do
|
||||
[[ "$PLATFORMIO_BUILD_FLAGS" == *"INDICATOR_WIFI_FONT_RECOVERY=1"* ]] \
|
||||
|| fail "$full_env omitted WiFi font recovery"
|
||||
;;
|
||||
sensecapindicator-lora-n16r2_companion_radio_full)
|
||||
[ "${MESHCORE_ESP32_FULL_PARTITION_TABLE:-}" \
|
||||
= "variants/sensecap_indicator-espnow/dual_ota_6400k_preserve_spiffs.csv" ] \
|
||||
|| fail "$full_env omitted the N16R2 preserve-SPIFFS table"
|
||||
[[ "$PLATFORMIO_BUILD_FLAGS" == *"INDICATOR_WIFI_FONT_RECOVERY=1"* ]] \
|
||||
|| fail "$full_env omitted WiFi font recovery"
|
||||
;;
|
||||
*)
|
||||
[ -z "${MESHCORE_ESP32_FULL_PARTITION_TABLE:-}" ] \
|
||||
|| fail "$full_env inherited another board's required partition table"
|
||||
|
||||
@@ -18,6 +18,10 @@ INDICATOR_PARTITIONS = (
|
||||
"variants/sensecap_indicator-espnow/"
|
||||
"dual_ota_2560k_preserve_spiffs.csv"
|
||||
)
|
||||
INDICATOR_N16R2_PARTITIONS = (
|
||||
"variants/sensecap_indicator-espnow/"
|
||||
"dual_ota_6400k_preserve_spiffs.csv"
|
||||
)
|
||||
|
||||
|
||||
class FakeBoardConfig:
|
||||
@@ -90,6 +94,27 @@ class Esp32FullPartitionTest(unittest.TestCase):
|
||||
self.assertEqual(board.values["build.flash_mode"], "dio")
|
||||
self.assertIn(INDICATOR_PARTITIONS, output)
|
||||
|
||||
def test_n16r2_retains_factory_six_megabyte_ota_slots(self):
|
||||
profile = INDICATOR_PROFILE.read_text()
|
||||
self.assertIn(
|
||||
f"board_build.partitions = {INDICATOR_N16R2_PARTITIONS}", profile
|
||||
)
|
||||
table = (ROOT / INDICATOR_N16R2_PARTITIONS).read_text()
|
||||
self.assertIn("app0, app, ota_0, 0x10000, 0x640000", table)
|
||||
self.assertIn("app1, app, ota_1, 0x650000, 0x640000", table)
|
||||
self.assertIn("spiffs, data, spiffs, 0xc90000, 0x360000", table)
|
||||
board, output = apply_policy(
|
||||
{
|
||||
"upload.flash_size": "16MB",
|
||||
"build.mcu": "esp32s3",
|
||||
"build.partitions": INDICATOR_N16R2_PARTITIONS,
|
||||
}
|
||||
)
|
||||
self.assertEqual(
|
||||
board.values["build.partitions"], INDICATOR_N16R2_PARTITIONS
|
||||
)
|
||||
self.assertIn(INDICATOR_N16R2_PARTITIONS, output)
|
||||
|
||||
def test_absolute_indicator_partition_path_is_also_preserved(self):
|
||||
absolute = str(ROOT / INDICATOR_PARTITIONS)
|
||||
board, _output = apply_policy(
|
||||
|
||||
@@ -36,6 +36,24 @@ def numeric_flag(name: str) -> float:
|
||||
|
||||
|
||||
class IndicatorDisplayProfileTest(unittest.TestCase):
|
||||
def test_preserves_original_indicator_memory_profile(self):
|
||||
profile = base_profile()
|
||||
self.assertIn("board_build.arduino.memory_type = qio_opi", profile)
|
||||
self.assertIn("board_build.psram_type = opi", profile)
|
||||
self.assertIn("board_upload.flash_size = 8MB", profile)
|
||||
|
||||
def test_n16r2_profile_uses_quad_psram_and_full_flash(self):
|
||||
profile = PROFILE.read_text()
|
||||
start = profile.index(
|
||||
"[env:SenseCapIndicator-LoRa-N16R2_comp_radio_usb_wifi]"
|
||||
)
|
||||
n16r2 = profile[start:]
|
||||
self.assertIn("board_build.arduino.memory_type = qio_qspi", n16r2)
|
||||
self.assertIn("board_build.psram_type = qspi", n16r2)
|
||||
self.assertIn("board_upload.flash_size = 16MB", n16r2)
|
||||
self.assertIn("board_upload.maximum_size = 16777216", n16r2)
|
||||
self.assertIn("dual_ota_6400k_preserve_spiffs.csv", n16r2)
|
||||
|
||||
def test_preserves_logical_ui_and_fills_panel(self):
|
||||
panel_size = 480
|
||||
zoom = numeric_flag("UI_ZOOM")
|
||||
|
||||
@@ -318,6 +318,11 @@ printf '%s\n' "$PLATFORMIO_BUILD_FLAGS"
|
||||
"SenseCapIndicator-LoRa_companion_radio_full'",
|
||||
build,
|
||||
)
|
||||
self.assertIn(
|
||||
"'SenseCapIndicator-LoRa-N16R2_comp_radio_usb_wifi|"
|
||||
"SenseCapIndicator-LoRa-N16R2_companion_radio_full'",
|
||||
build,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user