parent
e329b3bd2e
commit
f365726a8e
@ -197,7 +197,7 @@ namespace pxsim.basic {
|
|||||||
clearScreen();
|
clearScreen();
|
||||||
pause(interval * 5);
|
pause(interval * 5);
|
||||||
} else {
|
} else {
|
||||||
if (s.length == 1) showLeds(createImageFromString(s), interval * 5)
|
if (s.length == 1) showLeds(createImageFromString(s + " "), interval * 5)
|
||||||
else ImageMethods.scrollImage(createImageFromString(s + " "), 1, interval);
|
else ImageMethods.scrollImage(createImageFromString(s + " "), 1, interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -726,7 +726,7 @@ namespace pxsim.ImageMethods {
|
|||||||
interval: interval,
|
interval: interval,
|
||||||
frame: () => {
|
frame: () => {
|
||||||
//TODO: support right to left.
|
//TODO: support right to left.
|
||||||
if (off >= leds.width + 5 || off < 0) return false;
|
if (off >= leds.width || off < 0) return false;
|
||||||
stride > 0 ? display.shiftLeft(stride) : display.shiftRight(-stride);
|
stride > 0 ? display.shiftLeft(stride) : display.shiftRight(-stride);
|
||||||
let c = Math.min(stride, leds.width - off);
|
let c = Math.min(stride, leds.width - off);
|
||||||
leds.copyTo(off, c, display, 5 - stride)
|
leds.copyTo(off, c, display, 5 - stride)
|
||||||
|
Loading…
Reference in New Issue
Block a user