-
Regarding a pause. I am really missing it.
there are promises, setTimeout (just google 'javascript sleep') or in this case you can send next message in ack/nack handler of previous message?
Tried to implement sleep() in C
To make fastest sleep ever? You can shoot yourself in the foot much easier in javascript via
for
orwhile
loop, or evendigitalPulse
, no need for inline C to block everything.Uncaught Error: 'E.InlineC' calls should have been replaced
this needs to run gcc behind scenes, you are probably copy pasting directly to console or directly upload file or compiler in WebIDE does not work for some reason.
-
there are promises, setTimeout (just google 'javascript sleep')
promises are too cumbersome (for me :)). setTimeout is not blocking current "thread". Though it is possible to issue multiple growing timeouts for each message.
or in this case you can send next message in ack/nack handler of previous message?
That is exactly what I've done. And this is the best way. Better than a "pause".
To make fastest sleep ever? You can shoot yourself in the foot much easier in javascript via for or while loop, or even digitalPulse, no need for inline C to block everything.
while loop will eat energy. Sleep supposed to halt CPU. Yes in case of single threaded it will stop everything. Question - will it stop UARTs?
this needs to run gcc behind scenes, you are probably copy pasting directly to console
yes :(. Understood.
No problem :)
Wow, that is complex. Is it possible, may be via the GB, or another way, just to download a content from an URL?
I believe it would work better than just relying on 128 bytes chunks. Because end of previous message and beginning of next one can be inside a chunk.
And CASIC doc states in 2.5 CASIC message exchange, that app should not send next message before it receives ACK.
Though I do not trust Zhongke anymore :), and it can be Ok to send without awaiting for ACK, I just believe it makes sense to wait for it.
Regarding a pause. I am really missing it. Tried to implement sleep() in C, but got an error