esc_battery: fix timeout check

This commit is contained in:
Julian Oes
2020-03-26 17:10:15 +01:00
parent f650b91718
commit ae219c3272
+1 -1
View File
@@ -86,7 +86,7 @@ EscBattery::Run()
if (_esc_status_sub.update(&esc_status)) {
if (hrt_elapsed_time(&esc_status.timestamp) < 500_ms ||
if (hrt_elapsed_time(&esc_status.timestamp) > 500_ms ||
esc_status.esc_count == 0 ||
esc_status.esc_count > 8) {
return;