()
| 50 | |
| 51 | |
| 52 | def 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 | |
| 71 | if __name__ == "__main__": |
no test coverage detected