Technician tool v0.5
Imported from the Google Drive folder 004-technician_tool/v0.5.
This commit is contained in:
1 parent
72adfe1cec
commit
f5b32e1554
21 files changed
+2036
-442
No files matched your search
@@ -25,6 +25,7 @@ from ..core.logline import LineKind, LogLine
|
||||
from .firmware import FirmwareInfo
|
||||
|
||||
RULES_PATH = Path(__file__).with_name("rules.toml")
|
||||
_MAC_LINE = re.compile(r"Device MAC address: ([0-9A-Fa-f]{2}(?::[0-9A-Fa-f]{2}){5})")
|
||||
|
||||
|
||||
class Severity(IntEnum):
|
||||
@@ -278,6 +279,7 @@ class DiagnosticsEngine:
|
||||
self._tool_reset_at: float | None = None
|
||||
self._panic_tail = 0 # RAW lines after a panic line to keep
|
||||
self.technician: list[str] = []
|
||||
self.mac: str | None = None # from "ID: Device MAC address: ..." at boot
|
||||
|
||||
@property
|
||||
def boot(self) -> BootRecord:
|
||||
@@ -317,6 +319,8 @@ class DiagnosticsEngine:
|
||||
self._crash_finding().evidence.append(text)
|
||||
|
||||
self.firmware.observe(text)
|
||||
if m := _MAC_LINE.search(text):
|
||||
self.mac = m.group(1).upper()
|
||||
matched = False
|
||||
for rule in self.rules:
|
||||
m = rule.pattern.search(text)
|
||||
|
||||
@@ -379,7 +379,7 @@ severity = "critical"
|
||||
title = "SD card is unreadable or has wrong settings"
|
||||
text = "Even after re-seating, the card or its ENV.TXT cannot be used."
|
||||
actions = [
|
||||
"Re-provision the card with the tool (SD tab, coming in v0.5) or use a new card.",
|
||||
"Re-provision the card with the tool (SD card tab) or use a new card.",
|
||||
"The Diagnosis tab shows which step failed (card, file system or ENV.TXT keys).",
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user