ChameleonMini icon indicating copy to clipboard operation
ChameleonMini copied to clipboard

Timeout - difference between documentation and reality

Open geo-rg opened this issue 7 years ago • 1 comments

For a few weeks now, there was a pull request that wanted to change the online documentation since there stood, that the timeout is in multiples of 128ms and timeout=? returns that it is in multiples of 100ms.

The truth is: the Chameleon uses multiples of 128ms. However, this is not a function that is thought to work exactly to the millisecond (it also is not implemented so accurate). The intention was that you can set a timeout, which defines how long the upcoming timeout commands at least will be pending, if they aren't finished successfully before. Also, calculating with multiples of 100 is easier ;) So if you want 1 second, you set the timeout to 10 (it then is actually 1.28s, but it may happen that the timeout occurs only after 1.29s or 1.30s).

So what do you think: Should we change the firmware, so "timeout=?" returns the truth or is it ok like it is currently?

geo-rg avatar Jan 17 '17 09:01 geo-rg

Personally I also prefer a more accurate answer from "timeout". I propose to present things like this:

timeout?
101:OK WITH TEXT
1280 ms

timeout=?
101:OK WITH TEXT
0 = no timeout
1-60000 = timeout in ms (will be rounded to next multiple of 128 ms)

and to compute timeout from desired nr of ms, sth like (x+127) & 0xffffff80

doegox avatar Jan 17 '17 11:01 doegox