소스 검색

preliminary

ZinggJM 8 년 전
부모
커밋
7f5224aeef
1개의 변경된 파일과 4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino

+ 4 - 2
examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino

@@ -317,8 +317,9 @@ void showBitmapFrom_HTTP(const char* host, const char* path, const char* filenam
         {
           delay(1); // yield() to avoid WDT
           uint32_t got = client.read(buffer, rowSize);
-          while (got < rowSize)
+          while ((got < rowSize) && client.connected())
           {
+            delay(1); // yield() to avoid WDT
             got += client.read(buffer + got, rowSize - got);
           }
           bytes_read += got;
@@ -463,8 +464,9 @@ void showBitmapFrom_HTTPS(const char* host, const char* path, const char* filena
         {
           delay(1); // yield() to avoid WDT
           uint32_t got = client.read(buffer, rowSize);
-          while (got < rowSize)
+          while ((got < rowSize) && client.connected())
           {
+            delay(1); // yield() to avoid WDT
             got += client.read(buffer + got, rowSize - got);
           }
           bytes_read += got;