ManualControl: correct calculation of dt in seconds

This commit is contained in:
Matthias Grob 2021-10-06 15:53:15 +02:00
parent 12bb2de175
commit 2528e8c572
1 changed files with 1 additions and 2 deletions

View File

@ -90,13 +90,12 @@ void ManualControl::Run()
bool found_at_least_one = false;
const hrt_abstime now = hrt_absolute_time();
const float dt_s = now - _last_time;
const float dt_s = (now - _last_time) / 1e6f;
for (int i = 0; i < MAX_MANUAL_INPUT_COUNT; i++) {
manual_control_input_s manual_control_input;
if (_manual_control_input_subs[i].update(&manual_control_input)) {
found_at_least_one = true;
_selector.update_manual_control_input(now, manual_control_input, i);
}