MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / main

Function main

wipe_epd.py:52–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def main() -> int:
53 epd_type = resolve_epd_type()
54 if not epd_type:
55 print("wipe_epd: no EPD type configured, skipping", file=sys.stderr)
56 return 0
57 # Non-EPD displays are managed by display.py — no wipe needed on restart
58 _NON_EPD_TYPES = ("max7219_4panel", "max7219_8panel", "ssd1306", "gc9a01")
59 if epd_type in _NON_EPD_TYPES:
60 print(f"wipe_epd: {epd_type} is not an e-paper display, skipping wipe")
61 return 0
62 try:
63 wipe_display(epd_type)
64 except Exception as exc: # pragma: no cover - hardware specific
65 print(f"wipe_epd: failed to clear display ({exc})", file=sys.stderr)
66 return 1
67 print(f"wipe_epd: cleared display using {epd_type}")
68 return 0
69
70
71if __name__ == "__main__":

Callers 1

wipe_epd.pyFile · 0.70

Calls 2

wipe_displayFunction · 0.85
resolve_epd_typeFunction · 0.70

Tested by

no test coverage detected