Добавить общие графики и драйвер parallel NAND #3

Merged
Andrey merged 6 commits from feature/shared-plot-and-parallel-nand into master 2026-09-04 12:39:12 +03:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 392817432b - Show all commits

View File

@@ -129,7 +129,8 @@ def encode_settings(settings: Mapping[str, list[TrendSignal]]) -> str:
def decode_settings(text: str) -> dict[str, list[TrendSignal]]:
if len(text.encode("utf-8")) > MAX_FILE_BYTES:
raise ValueError("Trend configuration exceeds 1 MiB")
root = json.loads(text.removeprefix("\ufeff"))
# Python 3.8 is used by the Windows 7 port; remove at most one BOM.
root = json.loads(text[1:] if text.startswith("\ufeff") else text)
if not isinstance(root, dict) or root.get("format") != "setflash-trends" or type(root.get("version")) is not int or root["version"] != 1:
raise ValueError("Unknown trend configuration format/version")
profiles = root.get("profiles")

View File

@@ -9,6 +9,7 @@ import unittest
from protocan.plot import Bounds, Marker, Markers, PlotMath, Viewport
@unittest.skipUnless(os.environ.get("SETPROTOCOL_LIBRARY"), "Set SETPROTOCOL_LIBRARY to the built C library")
class PlotTests(unittest.TestCase):
@classmethod
def setUpClass(cls):