Skip to content

Commit 19a97d1

Browse files
committed
debugging
1 parent eb6cf58 commit 19a97d1

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

screen.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,35 @@ namespace user_interface_base {
125125
radio.sendString("" + maxPacketBufferSize + "," + bitmap.width + "," + bitmap.height);
126126

127127
// basic.showString("W")
128-
this.waitForAck();
128+
// this.waitForAck();
129+
130+
131+
let received = false;
132+
radio.onReceivedString((_: String) => {
133+
received = true;
134+
})
135+
136+
while (!received) {
137+
basic.pause(3)
138+
}
139+
129140

130141
// Send a chunk of the bitmap and wait for ACK, RX will rebuild the bitmap:
131142
for (let j = 0; j < numberOfChunks; j++) {
132143
const rowBuffer = this.getBuffer(bitmap, j, maxPacketBufferSize);
133144
radio.sendBuffer(rowBuffer);
134145

135-
this.waitForAck();
146+
// this.waitForAck();
147+
148+
let received = false;
149+
radio.onReceivedString((_: String) => {
150+
received = true;
151+
})
152+
153+
while (!received) {
154+
basic.pause(3)
155+
}
156+
136157
}
137158

138159
// basic.showString("D")

0 commit comments

Comments
 (0)