dd0970ed7c
Three bugs fixed: - NVS img_id now written before epd_init/draw; new draw_needed flag in NVS survives power-loss mid-refresh so next boot re-draws from LittleFS instead of showing stale content - epd_sleep() now only called when display was initialized this cycle, preventing a 60 s wait_busy() timeout on every 304 poll - esp_task_wdt_reset() added to wait_busy() loop so the ~20 s 6-color refresh no longer triggers the task watchdog Also extracts normal_operation into operation.h template and adds a native PlatformIO test suite (16 tests) covering the full response matrix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
632 B
C
18 lines
632 B
C
#pragma once
|
|
#include "Arduino.h"
|
|
|
|
// Call counters for assertions
|
|
extern int g_epd_init_count;
|
|
extern int g_epd_sleep_count;
|
|
extern int g_epd_draw_image_count;
|
|
extern int g_epd_fill_count;
|
|
extern int g_epd_fill_last_color;
|
|
extern int g_epd_draw_setup_count;
|
|
|
|
inline void epd_init() { g_epd_init_count++; }
|
|
inline void epd_sleep() { g_epd_sleep_count++; }
|
|
inline void epd_draw_image_from_file(File& f) { g_epd_draw_image_count++; }
|
|
inline void epd_fill(int color) { g_epd_fill_count++; g_epd_fill_last_color = color; }
|
|
inline void epd_draw_ap_screen(void*) {}
|
|
inline void epd_draw_setup_screen(void*) { g_epd_draw_setup_count++; }
|