Pixl.js: fix self-test/terminal print - write to screen immediately after newline unless in IRQ

This commit is contained in:
Gordon Williams 2020-05-15 10:14:26 +01:00
parent 58c200314a
commit 56d1918f8d
2 changed files with 6 additions and 1 deletions

View File

@ -38,6 +38,7 @@
Bangle.js: read `setting.json` at init and modify Bangle.beep/buzz behaviour accordingly
Tensorflow: remove some as-yet unused operators to free space
nRF52: Speed up bootloader, remove pauses on Pixl.js
Pixl.js: fix self-test/terminal print - write to screen immediately after newline unless in IRQ
2v05 : Add Array.includes
Fix (Number.toFixed) rounding, eg (1234.505).toFixed(2)

View File

@ -18,6 +18,7 @@
#include "graphics.h"
#include "jsparse.h"
#include "jsdevices.h"
#include "jshardware.h"
/*JSON{
"type" : "object",
@ -89,7 +90,10 @@ void terminalScroll() {
JsGraphics gfx;
if (terminalGetGFX(&gfx)) {
graphicsScroll(&gfx, 0, -TERMINAL_CHAR_H);
terminalSetGFX(&gfx); // save and flip
terminalSetGFX(&gfx); // save
// if we're not in an IRQ, flip this now
if (!jshIsInInterrupt())
jswrap_terminal_idle();
}
}