ManualControlSelector: refactor timeout calculation to be consistent

This commit is contained in:
Matthias Grob 2021-10-06 15:54:44 +02:00
parent 2528e8c572
commit 63ddb050ef
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ namespace manual_control
void ManualControlSelector::update_time_only(uint64_t now)
{
if (_setpoint.chosen_input.timestamp_sample + _timeout < now) {
if (now - _setpoint.chosen_input.timestamp_sample > _timeout) {
_setpoint.valid = false;
_instance = -1;
}