Skip to content

Commit c695eac

Browse files
committed
Replacing waitForAck() with tryToSend()
1 parent 9a8bd80 commit c695eac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

screen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ namespace user_interface_base {
194194
c
195195
])
196196
)
197+
basic.pause(15)
197198
}
198199

199200
public static drawLineXfrm(
@@ -225,6 +226,7 @@ namespace user_interface_base {
225226
const c = shader(tx, ty)
226227
if (c) {
227228
Screen.setPixel(x, y, c)
229+
basic.pause(15)
228230
}
229231
}
230232
}
@@ -238,6 +240,7 @@ namespace user_interface_base {
238240
c: number
239241
) {
240242
this.tryToSend(Buffer.fromArray([SCREEN_FN_ID_DRAW_RECT, x + Screen.HALF_WIDTH, y + Screen.HALF_HEIGHT, width, height, c]));
243+
basic.pause(15)
241244
}
242245

243246
public static drawRectXfrm(
@@ -257,6 +260,7 @@ namespace user_interface_base {
257260
c: number
258261
) {
259262
this.tryToSend(Buffer.fromArray([SCREEN_FN_ID_FILL, c]))
263+
basic.pause(15)
260264
}
261265

262266
public static fillRect(
@@ -267,6 +271,7 @@ namespace user_interface_base {
267271
c: number
268272
) {
269273
this.tryToSend(Buffer.fromArray([SCREEN_FN_ID_FILL_RECT, x + Screen.HALF_WIDTH, y + Screen.HALF_HEIGHT, width, height, c]))
274+
basic.pause(15)
270275
}
271276

272277
public static fillRectXfrm(
@@ -458,6 +463,7 @@ namespace user_interface_base {
458463

459464
const c: number = (color == null) ? 0 : color;
460465
this.tryToSend(Buffer.fromArray([SCREEN_FN_ID_PRINT, x + Screen.HALF_WIDTH, y + Screen.HALF_HEIGHT, c]));
466+
basic.pause(15)
461467
}
462468
}
463469
}

0 commit comments

Comments
 (0)