intel / mavlink-vehicles

A Mavlink wrapper dedicated to the most common messages that are exchanged between an air vehicle and a ground station
Apache License 2.0
6 stars 9 forks source link

Fix is_timedout() #22

Closed guiccbr closed 7 years ago

guiccbr commented 7 years ago

We should detect a timeout when current_time - timestamp >= timeout, and not only when curr_time - timestamp > timeout.

If we don't do that, commands with request intervals equal to zero would be ignored if called two or more times in a time interval of less than one millisecond. Since, intuitively, a command with a minimum request interval equal to zero does not have a minimum request interval at all - and so should never be ignored - we should change the comparison in this line to the one suggested above.