Add curses dashboard and XIAO bridge examples; enhance stream parser for UTF-8 logging

This commit is contained in:
pdxlocations
2026-08-01 00:46:04 -07:00
parent d96435b7c4
commit d242a82d1d
8 changed files with 988 additions and 65 deletions
+6
View File
@@ -77,6 +77,12 @@ class MicroMeshTests(unittest.TestCase):
self.assertEqual(packets, [b"one", b"two"])
self.assertEqual(logs, ["debug line"])
def test_stream_parser_sanitizes_invalid_utf8_logs(self):
logs = []
parser = StreamParser(on_log=logs.append)
self.assertEqual(parser.feed(b"bad:\xff\xfe\n"), [])
self.assertEqual(logs, ["bad:??"])
def test_send_text_builds_to_radio_frame(self):
import micromesh.interface as interface_module
old_packet_id = interface_module._packet_id