rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
can_vag.h File Reference

Functions

void canDashboardVAG (CanCycle cycle)
 

Function Documentation

◆ canDashboardVAG()

void canDashboardVAG ( CanCycle  cycle)

Definition at line 185 of file can_dash.cpp.

185 {
186 if (cycle.isInterval(CI::_10ms)) {
187 {
188 // https://github.com/commaai/opendbc/blob/57c8340a180dd8c75139b18050eb17c72c9cb6e4/vw_golf_mk4.dbc#L394
189 //VAG Dashboard
190 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_1);
191 msg.setShortValue(Sensor::getOrZero(SensorType::Rpm) * 4, 2); //RPM
192 }
193
195
196 {
197 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_2);
198 msg.setShortValue((int) ((clt + 48.373) / 0.75), 1); //Coolant Temp
199 }
200
201 {
202 CanTxMessage msg(CanCategory::NBC, CAN_VAG_CLT_V2);
203 msg.setShortValue((int) ((clt + 48.373) / 0.75), 4); //Coolant Temp
204 }
205
206 {
207 CanTxMessage msg(CanCategory::NBC, CAN_VAG_IMMO);
208 msg.setShortValue(0x80, 1);
209 }
210 }
211}
bool isInterval(CanInterval interval)
Definition can.h:90
static float getOrZero(SensorType type)
Definition sensor.h:83
static CCM_OPTIONAL FunctionalSensor clt(SensorType::Clt, MS2NT(10))

Referenced by updateDash().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.