Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDT timeout whne I use Canvas scroll() #359

Open
ziv2013 opened this issue Oct 2, 2023 · 0 comments
Open

WDT timeout whne I use Canvas scroll() #359

ziv2013 opened this issue Oct 2, 2023 · 0 comments

Comments

@ziv2013
Copy link

ziv2013 commented Oct 2, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant