Skip to content

Commit f183f39

Browse files
committed
screen.ts acks
1 parent 971882e commit f183f39

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

screen.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ namespace user_interface_base {
123123

124124
// Send bitmap meta-data:
125125
radio.sendString("" + maxPacketBufferSize + "," + bitmap.width + "," + bitmap.height);
126+
127+
basic.showString("W")
126128
this.waitForAck();
127129

128130
// Send a chunk of the bitmap and wait for ACK, RX will rebuild the bitmap:
@@ -132,17 +134,16 @@ namespace user_interface_base {
132134

133135
this.waitForAck();
134136
}
137+
138+
basic.showString("D")
135139
}
136140

137141

138142
public static drawTransparentImage(from: Bitmap, x: number, y: number) {
139-
// let b = Buffer.create(from.width / 8);
143+
const hash = 0;
144+
145+
// TODO
140146

141-
// for (let row = 0; row < from.height; row++) {
142-
// from.getRows(row, b);
143-
// radio.sendBuffer(b)
144-
// }
145-
// Just separate the sendBitmap function into this file, make it have a static array that it can update, hash 'from' into that to get an index that you send.
146147
radio.sendBuffer(Buffer.fromArray([SCREEN_FN_ID_DRAW_TRANSPARENT_IMAGE, x, y]));
147148
this.waitForAck();
148149
}

0 commit comments

Comments
 (0)