Files
MeshCore/tools/hil/test_profile_preamble_diagnostic.py
T
mikecarper bd30388436 Speed up SX1262 profile switching and verify radio lab behavior
Keep TCXO warm during owned dual-profile retunes, batch modulation setup, and enable guarded fast RX with buffered 8 MHz SPI on XIAO S3 WIO and Indicator LoRa. Preserve lifecycle invalidation, packet guards, rollback, and existing scheduling budgets.

Add reliable sequence-scoped USB lab transport, native regression coverage, bounded channel and preamble diagnostics, and byte-exact measurement records including failed experiments and qualification limits.
2026-09-14 01:22:09 -07:00

22 lines
762 B
Python

import unittest
from profile_preamble_diagnostic import diagnostic_plan, check_word, OFFSETS
class PreambleDiagnosticTests(unittest.TestCase):
def test_balanced_bounded_controls(self):
plan = list(diagnostic_plan(8, 814910))
self.assertEqual(len(plan), 64)
for case in OFFSETS:
self.assertEqual(sum(offset == case for _, offset in plan), 8)
self.assertEqual(sum(offset is not None for _, offset in plan), 56)
def test_physical_frequency_word_check(self):
check_word({"rf_word": 954204160}, 910000)
check_word({"rf_word": 954466304}, 910250)
with self.assertRaises(RuntimeError):
check_word({"rf_word": 954204160}, 910250)
if __name__ == "__main__":
unittest.main()