From 4d7efd7fbcf1555eea45f534789adc709ba79f4c Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Wed, 30 Mar 2022 18:15:55 -0400 Subject: [PATCH] Add Intake Air Temperature, Add Fuel Level (#4028) Co-authored-by: hugovw1976 --- firmware/controllers/can/can_dash.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/can/can_dash.cpp b/firmware/controllers/can/can_dash.cpp index 81157ed0f6..3cb6477a7d 100644 --- a/firmware/controllers/can/can_dash.cpp +++ b/firmware/controllers/can/can_dash.cpp @@ -1045,8 +1045,9 @@ void canDashboardHaltech(CanCycle cycle) { msg[0] = (tmp >> 8); msg[1] = (tmp & 0x00ff); /* Air Temperature */ - msg[2] = 0x00; - msg[3] = 0x00; + tmp = ((Sensor::getOrZero(SensorType::Iat) + 273.15) * 10); + msg[2] = (tmp >> 8); + msg[3] = (tmp & 0x00ff); /* Fuel Temperature */ msg[4] = 0x00; msg[5] = 0x00; @@ -1073,8 +1074,9 @@ void canDashboardHaltech(CanCycle cycle) { { CanTxMessage msg(0x3E2, 2); /* Fuel Level in Liters */ - msg[0] = 0x00; - msg[1] = 0xff; + tmp = (Sensor::getOrZero(SensorType::FuelLevel)* 10); + msg[0] = (tmp >> 8); + msg[1] = (tmp & 0x00ff); } /* 0x3E3 = 5Hz rate */