Closed motib closed 9 years ago
Hello you can clear the data at the end of "prox.comm" event:
call math.fill(prox.comm.rx._intensities,0)
It works (and I can also set prox.comm.rx to 0). But ... while I can do it, I'd rather not have students do this. It's like in Java where even a 1-line program starts with "public static void main(String[] args)". It's too complicated to explain to beginners and they don't like "magic." I think that this should be done automatically. So I'd like to leave this issue open for the next FW update. Thanks Moti
No, the firmware cannot do this automatically, this is the only way to acknowledge that the VM has processed the information.
We could imagine to have a higher-level API in the firmware. I do not say we have to, but it is not impossible. It depends on what we see the users need.
yes, we need to define a protocol, which is not trivial to do. This was the plan from start, it was just never done. This is the reason why we have a few bits more than 8 bits, this could be used for framing/special network messages.
There is no way to clear prox.comm.rx._intensities[] and hence to clear prox.comm.rx. They are only cleared by turning the Thymio off. This is important so that a program can reset itself or to have different behaviors in different parts of the program.