File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff 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")
You can’t perform that action at this time.
0 commit comments