1
0

Pin additons

This commit is contained in:
Aiden
2026-05-25 15:18:47 +10:00
parent cdfb811c28
commit a82f3f6628
10 changed files with 3498 additions and 50 deletions

View File

@@ -207,6 +207,29 @@ def board_metadata_for_instruction(
return metadata if isinstance(metadata, dict) else None
def board_json_payload(analysis: Mapping[str, object] | None) -> dict[str, object]:
if not analysis:
return {
"board": None,
"name": None,
"summary": None,
"manual_references": [],
"traces": [],
"channels": {},
"instructions": {},
}
return {
"board": analysis.get("board"),
"name": analysis.get("name"),
"summary": analysis.get("summary"),
"manual_references": analysis.get("manual_references", []),
"traces": analysis.get("traces", []),
"channels": analysis.get("channels", {}),
"instructions": analysis.get("instructions", {}),
"state": analysis.get("state", {}),
}
def _initial_channel_payload(profile: Mapping[str, object]) -> dict[str, dict[str, object]]:
traces = [dict(trace) for trace in profile["traces"] if isinstance(trace, Mapping)]
return {