Skip to content

Commit 9b36c65

Browse files
committed
删除 loop 中的更新动画,使用 Thread 更新
1 parent fa89639 commit 9b36c65

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/SmallDesktopDisplay.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,24 +1431,20 @@ void setup()
14311431

14321432
const uint8_t *Animate_value; // 指向关键帧的指针
14331433
uint32_t Animate_size; // 指向关键帧大小的指针
1434+
// 更新动画帧
14341435
void refresh_AnimatedImage()
14351436
{
14361437
#if Animate_Choice
14371438
if (DHT_img_flag == 0)
14381439
{
1439-
if (millis() - Animate_reflash_Time > TMS / ANIMATE_FPS) // x ms切换一次
1440-
{
1441-
Animate_reflash_Time = millis();
1442-
imgAnim(&Animate_value, &Animate_size);
1443-
TJpgDec.drawJpg(160, 160, Animate_value, Animate_size);
1444-
}
1440+
imgAnim(&Animate_value, &Animate_size);
1441+
TJpgDec.drawJpg(160, 160, Animate_value, Animate_size);
14451442
}
14461443
#endif
14471444
}
14481445

14491446
void loop()
14501447
{
1451-
refresh_AnimatedImage(); // 更新右下角动画
14521448
WIFI_reflash_All(); // WIFI应用
14531449
Supervisor_controller(); // 守护线程池
14541450
Serial_set(); // 串口响应

0 commit comments

Comments
 (0)