Skip to content

Commit

Permalink
AP_EFI: DroneCAN: set the last_updated_ms field of efi_state
Browse files Browse the repository at this point in the history
The last_update_ms variable was never set in the DroneCAN implementation of the Electronic Fuel Injector sensor. This causes the function bool AP_EFI::is_healthy to always return false. Solved by adding one line of code to set the variable to the correct value.
  • Loading branch information
Valentin Berman authored and peterbarker committed Jul 14, 2024
1 parent ef9763f commit 4938a6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_EFI/AP_EFI_DroneCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ void AP_EFI_DroneCAN::handle_status(const uavcan_equipment_ice_reciprocating_Sta
c.lambda_coefficient = cs.lambda_coefficient;
}

// Required for healthy message
istate.last_updated_ms = AP_HAL::millis();

copy_to_frontend();
}

Expand Down

0 comments on commit 4938a6b

Please sign in to comment.