execuc / v202-receiver

v202 2.4G arduino receiver
MIT License
62 stars 19 forks source link

It shouldn't waste time when there is nothing to do #2

Closed Suxsem closed 7 years ago

Suxsem commented 8 years ago

Hi. I'm studying your code to do something similar with the syma x5c quadcopter protocol. I don't have a wltoys remote so I can't test the code, but in readme you say "State machine takes 120ms when a frame arrived and 32ms when there are nothing to do.".

But I don't get where the code blocks and wastes that time.

Can you explain better why and where the program wastes time?

Suxsem commented 8 years ago

It's possible that you meant uS and not ms? because the timestamp is taken with time = micros();

execuc commented 8 years ago

Hi, I am really happy you had developed a new library for another protocol. I really don't remember how I have calculated 32ms/120ms. I don't think I confused millis/micro because micro is verry little because of spi communication and CRC check. But maybe I used serial.print during timing which add time. I will verify when I can. I thank you for mentioning me in your thanks bu could you use execuc instead of name ? Thanks

Suxsem commented 8 years ago

Sure, just did it :) If you can figure out how you calculated those times please let me know, thanks!

execuc commented 8 years ago

OK, I have tested and I have wrong. It is 120 us and not ms. Sorry, I will modify comment in code.