Fix showString interval for single character (#1058)
This commit is contained in:
parent
7b9ea6f2d5
commit
ae0a684d2e
@ -247,14 +247,15 @@ namespace pxsim.basic {
|
|||||||
if (s.length == 0) {
|
if (s.length == 0) {
|
||||||
clearScreen();
|
clearScreen();
|
||||||
pause(interval * 5);
|
pause(interval * 5);
|
||||||
|
} else if (s.length > 1) {
|
||||||
|
ImageMethods.scrollImage(createImageFromString(s + " "), 1, interval);
|
||||||
} else {
|
} else {
|
||||||
if (s.length == 1) showLeds(createImageFromString(s), 0);
|
showLeds(createImageFromString(s), interval * 5);
|
||||||
else ImageMethods.scrollImage(createImageFromString(s + " "), 1, interval);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showLeds(leds: Image, delay: number): void {
|
export function showLeds(leds: Image, interval: number): void {
|
||||||
showAnimation(leds, delay);
|
showAnimation(leds, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearScreen() {
|
export function clearScreen() {
|
||||||
|
Loading…
Reference in New Issue
Block a user