ITS ALIVE

This commit is contained in:
Steven Tracey 2024-11-21 17:43:14 -05:00
parent 12184a36f5
commit b50d7129ae

View File

@ -15,18 +15,22 @@
#include "../libs/GUI/GUI_BMPfile.h"
#include "../libs/Config/Debug.h"
void Handler(int sigNum) {
DebugLine(28, 0, "Caught signal %d\n", sigNum);
void close() {
EPD_2in13_V4_Init();
EPD_2in13_V4_Clear();
DebugLine(29, 0, "Goto Sleep...\r\n");
EPD_2in13_V4_Sleep();
DEV_Delay_ms(2000);//important, at least 2s
endwin();
DEV_Module_Exit();
}
void Handler(int sigNum) {
DebugLine(28, 0, "Caught signal %d\n", sigNum);
close();
endwin();
exit(0);
}
@ -51,6 +55,8 @@ void home(UWORD *blackImage) {
EPD_2in13_V4_Display_Base(blackImage);
freeCStringArray(configNames, length);
EPD_2in13_V4_Sleep(2000);
}
void code(UWORD *blackImage) {
@ -153,6 +159,7 @@ int main() {
drawLoop();
close();
endwin();
return 0;
}