mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-14 04:15:35 +00:00
Implement radio2, tempradio2, radioat2 and tempradioat2 across Mesh roles, with RX-only/RX+TX operation, optional preambles and persistent cross-TX policy. Keep temporary OTA traffic on its profile by default and maintain independent retry ownership and backoff for each profile. Use slow-first receive scanning with 4.8-symbol visits and automatic preambles rounded up in steps of eight. Preserve pending RX, restore power saving on exit, and discard work bound to changed or expired profiles. Restore the infrastructure path.hash.mode setter and report unsupported extra.sf settings consistently. Add CLI, scheduling, scan and retry tests, setup documentation, and the V4/XIAO hardware validation results. Validation: 1,422 native tests, eight KISS tests, 63 final focused profile tests, 18 checks from the staged source, sanitizer-enabled OTA transfers, and builds for V4 Mesh roles, Full XIAO Companion and nRF52 T1000-E. Hardware checks cover reception, cross-TX policy, expiry, reboot and OTA discovery while receiving main-channel adverts.
26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
"""Run the production shared profile command parser and persistence with a memory FS."""
|
|
from pathlib import Path
|
|
import shutil
|
|
import subprocess
|
|
import tempfile
|
|
import unittest
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
class RadioProfileCLITest(unittest.TestCase):
|
|
def test_commands_persistence_and_timers(self):
|
|
compiler = shutil.which('g++') or shutil.which('clang++')
|
|
self.assertIsNotNone(compiler)
|
|
with tempfile.TemporaryDirectory() as work:
|
|
exe = Path(work) / 'profiles.exe'
|
|
subprocess.run([compiler, '-std=c++17', '-Wall', '-Wextra',
|
|
'-I', str(ROOT/'test/fixtures/radio_profiles/mocks'),
|
|
'-I', str(ROOT/'test/mocks'), '-I', str(ROOT/'src'),
|
|
str(ROOT/'src/helpers/RadioProfileCLI.cpp'),
|
|
str(ROOT/'test/fixtures/radio_profiles/cli_test.cpp'),
|
|
'-o', str(exe)], check=True, capture_output=True, text=True)
|
|
subprocess.run([str(exe)], check=True)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|