mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
esc_battery: fix timeout check
This commit is contained in:
@@ -86,7 +86,7 @@ EscBattery::Run()
|
|||||||
|
|
||||||
if (_esc_status_sub.update(&esc_status)) {
|
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 == 0 ||
|
||||||
esc_status.esc_count > 8) {
|
esc_status.esc_count > 8) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user