FabGL
FabGL copied to clipboard
WDT timeout whne I use Canvas scroll()
I have written a simple test program:
1.Draw a Rectangle 2.Move it with scroll()
But the program would crash with below error
"E (27762) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (27762) task_wdt: - IDLE (CPU 0) E (27762) task_wdt: Tasks currently running: E (27762) task_wdt: CPU 0: E (27762) task_wdt: CPU 1: IDLE E (27762) task_wdt: Aborting.
abort() was called at PC 0x400df1f5 on core 0
Backtrace: 0x40085595:0x3ffbef4c |<-CORRUPTED
ELF file SHA256: 4f932d1d8a7fc922
Rebooting..."
`#include "fabgl.h"
const int WIDTH = 640; const int HEIGHT = 400;
// VGA 显示 fabgl::VGA16Controller DisplayController; Canvas cv(&DisplayController);
void setup() { Serial.begin(115200); DisplayController.begin(); // 设定分辨率 DisplayController.setResolution(VGA_640x400_60Hz);
//cv.setScrollingRegion(0, 0, WIDTH - 1, HEIGHT - 1);
cv.drawRectangle(10,100,90,200); }
int value = 0; boolean LeftToRight = true;
void loop() { if (value == WIDTH - 100) { LeftToRight = 1; } if (value == 0) { LeftToRight = 0; } if (LeftToRight == 0) { cv.scroll(1, 0); value++; } else { cv.scroll(-1, 0); value--; }
}`
And if I add delay(10) in the end of loop(), this issue would now occur. Is there any suggestion?