From ce51184ebf6392262a6521d772c0b1f7e696c439 Mon Sep 17 00:00:00 2001 From: rediskin Date: Tue, 2 May 2017 20:47:11 +0300 Subject: [PATCH] Improved RX8 cluster operation - clt needle, battery and clt lamps --- firmware/hw_layer/can_hw.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/hw_layer/can_hw.cpp b/firmware/hw_layer/can_hw.cpp index e54c502685..f915e25441 100644 --- a/firmware/hw_layer/can_hw.cpp +++ b/firmware/hw_layer/can_hw.cpp @@ -150,13 +150,16 @@ static void canMazdaRX8(void) { txmsg.data8[7] = 0x00; // Unused commonTxInit(CAN_MAZDA_RX_STATUS_2); - txmsg.data8[0] = 0x98; //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar + txmsg.data8[0] = (char)(engine->sensors.clt + 62); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar txmsg.data8[1] = 0x00; // something to do with trip meter 0x10, 0x11, 0x17 increments by 0.1 miles txmsg.data8[2] = 0x00; // unknown txmsg.data8[3] = 0x00; //unknown txmsg.data8[4] = 0x01; //Oil Pressure (not really a gauge) txmsg.data8[5] = 0x00; //check engine light txmsg.data8[6] = 0x00; //Coolant, oil and battery + if ((getRpmE(engine)>0) && (engine->sensors.vBatt<13)) setTxBit(6, 6); + if (txmsg.data8[0]>165) setTxBit(6, 1); + //oil pressure warning lamp bit is 7 txmsg.data8[7] = 0x00; //unused sendMessage(); }