mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
AP_EFI: make C_TO_KELVIN a function macro; create KELVIN_TO_C
This commit is contained in:
parent
ef11400e13
commit
19ff65a4ad
@ -90,8 +90,8 @@ void AP_EFI_NWPMU::handle_frame(AP_HAL::CANFrame &frame)
|
||||
internal_state.cylinder_status[0].cylinder_head_temperature = C_TO_KELVIN(data.coolant_temp * 0.1f);
|
||||
break;
|
||||
case NWPMU_TEMPERATURE_TYPE::F:
|
||||
internal_state.coolant_temperature = C_TO_KELVIN(((data.coolant_temp * 0.1f) - 32 * 5/9));
|
||||
internal_state.cylinder_status[0].cylinder_head_temperature = C_TO_KELVIN(((data.coolant_temp * 0.1f) - 32 * 5/9));
|
||||
internal_state.coolant_temperature = F_TO_KELVIN(data.coolant_temp * 0.1f);
|
||||
internal_state.cylinder_status[0].cylinder_head_temperature = F_TO_KELVIN(data.coolant_temp * 0.1f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user