Complete ESP32 partition expander and adaptive LoRa OTA pacing
This commit is contained in:
1 parent
e370db7f28
commit
a74a09da56
33 files changed
+986
-66
No files matched your search
@@ -63,6 +63,10 @@ MAX_ARCHIVE_MEMBER_SIZE = 64 * 1024 * 1024
|
||||
MAX_FIRMWARE_IMAGE_SIZE = 64 * 1024 * 1024
|
||||
LEGACY_TARGET_MAX_BLOCK_SIZE = 1024
|
||||
MOTA_MAX_BLOCK_SIZE = 2048
|
||||
# Lab/HIL OTA tests use one explicit tuple on every participating radio.
|
||||
# This is a bench default, not a regional or production firmware preset.
|
||||
# Override --temp-radio only when the hardware or local rules require it.
|
||||
DEFAULT_LAB_TEMP_RADIO = "909.5,500,5,5,120"
|
||||
TRANSMISSION_RETRY_LIMIT = 3
|
||||
TRANSMISSION_RETRY_WINDOW_SECONDS = 90
|
||||
TRANSMISSION_RETRY_DELAY_SECONDS = 2
|
||||
@@ -7150,7 +7154,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--temp-radio", default="909.950,250,5,5,120",
|
||||
"--temp-radio", default=DEFAULT_LAB_TEMP_RADIO,
|
||||
help="frequency,bw,sf,cr,minutes",
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -2452,7 +2452,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
default=ota.DEFAULT_RELAY_TX_DELAY,
|
||||
help="temporary flood txdelay for managed intermediate relays",
|
||||
)
|
||||
parser.add_argument("--temp-radio", default="909.950,250,5,5,120")
|
||||
parser.add_argument("--temp-radio", default=ota.DEFAULT_LAB_TEMP_RADIO)
|
||||
parser.add_argument(
|
||||
"--ota-hops",
|
||||
type=int,
|
||||
|
||||
@@ -378,7 +378,7 @@ ZIP and a persistent work directory. The runner enforces exact target, start
|
||||
body hash, package order, watchdog state, post-boot identity, and normal-radio
|
||||
restoration.
|
||||
|
||||
Direct bench: use `--temp-radio 909.950,500,5,5,120 --ota-hops 0`. Add
|
||||
Direct bench: use `--temp-radio 909.5,500,5,5,120 --ota-hops 0`. Add
|
||||
`--legacy-full-airtime` only where the frequency and local duty-cycle rules
|
||||
permit it; omit it otherwise. The runner saves and restores the original
|
||||
airtime factor and OTA hop reach.
|
||||
|
||||
@@ -360,11 +360,12 @@ class FormatTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(argparse.ArgumentTypeError, "bandwidth must be"):
|
||||
ota.parse_temp_radio("909.950,200,5,5,120")
|
||||
|
||||
def test_ota_runners_default_to_sf5_and_250_khz(self) -> None:
|
||||
def test_ota_runners_use_the_same_lab_tuple(self) -> None:
|
||||
generic = ota.build_parser().parse_args(["release.mota", "remote"])
|
||||
chain = rak_chain.build_parser().parse_args([])
|
||||
self.assertEqual(generic.temp_radio, "909.950,250,5,5,120")
|
||||
self.assertEqual(chain.temp_radio, "909.950,250,5,5,120")
|
||||
self.assertEqual(generic.temp_radio, ota.DEFAULT_LAB_TEMP_RADIO)
|
||||
self.assertEqual(chain.temp_radio, ota.DEFAULT_LAB_TEMP_RADIO)
|
||||
self.assertEqual(generic.temp_radio, "909.5,500,5,5,120")
|
||||
self.assertFalse(chain.legacy_full_airtime)
|
||||
|
||||
def test_package_build_timeout_is_configurable_and_positive(self) -> None:
|
||||
@@ -1736,7 +1737,7 @@ class SourceCliTests(unittest.TestCase):
|
||||
self.assertIn(
|
||||
mock.call(
|
||||
mock.ANY,
|
||||
"tempradio 909.950,250,5,5,120",
|
||||
f"tempradio {ota.DEFAULT_LAB_TEMP_RADIO}",
|
||||
retry=False,
|
||||
),
|
||||
source_cli.call_args_list,
|
||||
|
||||
@@ -252,7 +252,7 @@ def hardware_id_for_env(env_name: str) -> str:
|
||||
return hardware_id
|
||||
|
||||
role = re.search(
|
||||
r"[_-](?:repeater|repeatr|room_server|room_svr|sensor|terminal_chat|kiss_modem|"
|
||||
r"[_-](?:partition_expander|repeater|repeatr|room_server|room_svr|sensor|terminal_chat|kiss_modem|"
|
||||
r"companion_radio|companion|comp_radio)(?=[_-]|$)", env_name, re.IGNORECASE)
|
||||
family = (env_name[:role.start()] if role else env_name).strip("_-") or env_name.strip("_-")
|
||||
# Match the explicit MOTA_HW_ID shared by every role in these variant
|
||||
|
||||
@@ -1033,6 +1033,8 @@ def test_rak_nrf52_ota_profiles_keep_ina_and_gps_where_uart_is_available():
|
||||
|
||||
|
||||
def test_hardware_id_for_env():
|
||||
assert ml.hardware_id_for_env("Xiao_S3_WIO_partition_expander") == "Xiao_S3_WIO"
|
||||
assert ml.hardware_id_for_env("Xiao_S3_WIO_partition_expander") == ml.hardware_id_for_env("Xiao_S3_WIO_repeater")
|
||||
assert ml.hardware_id_for_env("RAK_4631_repeater") == "RAK4631"
|
||||
assert ml.hardware_id_for_env("RAK_4631_companion_radio_usb") == "RAK4631"
|
||||
assert (
|
||||
|
||||
Reference in new issue
Block a user