소스 검색

bypass auto-shutdown delay for e-ink devices

taco 2 달 전
부모
커밋
e449af1723
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 3
      examples/companion_radio/ui-new/UITask.cpp
  2. 1 1
      examples/companion_radio/ui-tiny/UITask.cpp

+ 1 - 3
examples/companion_radio/ui-new/UITask.cpp

@@ -840,9 +840,7 @@ void UITask::loop() {
           _display->drawTextCentered(_display->width() / 2, 20, "Low Battery.");
           _display->drawTextCentered(_display->width() / 2, 40, "Shutting Down!");
           _display->endFrame();
-          #if !defined(THINKNODE_M1) && !defined(LILYGO_TECHO) // TODO: refactor eink variants to use EINK_DISPLAY macros to gate this properly
-          delay(3000);
-          #endif
+          if (_display->isEink() == false) { delay(3000); }
         }
         shutdown();
       }

+ 1 - 1
examples/companion_radio/ui-tiny/UITask.cpp

@@ -735,7 +735,7 @@ void UITask::loop() {
         _display->setTextSize(1);
         _display->drawTextCentered(_display->width() / 2, 18, "Shutting down!");
         _display->endFrame();
-        delay(3000); // TODO: refactor eink variants to use EINK_DISPLAY macros to gate this properly
+        if (_display->isEink() == false) { delay(3000); }
         }
         shutdown();
       }