diff --git a/libraries/AP_EFI/AP_EFI_Serial_MS.cpp b/libraries/AP_EFI/AP_EFI_Serial_MS.cpp index e37300ae4f..4f70b2466c 100644 --- a/libraries/AP_EFI/AP_EFI_Serial_MS.cpp +++ b/libraries/AP_EFI/AP_EFI_Serial_MS.cpp @@ -110,12 +110,12 @@ bool AP_EFI_Serial_MS::read_incoming_realtime_data() case MAT_MSB: temp_float = (float)((data << 8) + read_byte_CRC32())/10.0f; offset++; - internal_state.intake_manifold_temperature = f_to_k(temp_float); + internal_state.intake_manifold_temperature = degF_to_Kelvin(temp_float); break; case CHT_MSB: temp_float = (float)((data << 8) + read_byte_CRC32())/10.0f; offset++; - internal_state.cylinder_status[0].cylinder_head_temperature = f_to_k(temp_float); + internal_state.cylinder_status[0].cylinder_head_temperature = degF_to_Kelvin(temp_float); break; case TPS_MSB: temp_float = (float)((data << 8) + read_byte_CRC32())/10.0f; diff --git a/libraries/AP_EFI/AP_EFI_Serial_MS.h b/libraries/AP_EFI/AP_EFI_Serial_MS.h index b78608a883..f72701d3b6 100644 --- a/libraries/AP_EFI/AP_EFI_Serial_MS.h +++ b/libraries/AP_EFI/AP_EFI_Serial_MS.h @@ -36,8 +36,7 @@ private: void send_request(uint8_t table, uint16_t first_offset, uint16_t last_offset); uint8_t read_byte_CRC32(); uint32_t CRC32_compute_byte(uint32_t inCrc32, uint8_t data); - float f_to_k(float temp_f) { return (temp_f + 459.67f) * 0.55556f; }; - + // Serial Protocol Variables uint32_t checksum; uint8_t step;