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 183 of file can_dash.cpp.

183 {
184 if (cycle.isInterval(CI::_10ms)) {
185 {
186 // https://github.com/commaai/opendbc/blob/57c8340a180dd8c75139b18050eb17c72c9cb6e4/vw_golf_mk4.dbc#L394
187 //VAG Dashboard
188 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_1);
189 msg.setShortValue(Sensor::getOrZero(SensorType::Rpm) * 4, 2); //RPM
190 }
191
193
194 {
195 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_2);
196 msg.setShortValue((int) ((clt + 48.373) / 0.75), 1); //Coolant Temp
197 }
198
199 {
200 CanTxMessage msg(CanCategory::NBC, CAN_VAG_CLT_V2);
201 msg.setShortValue((int) ((clt + 48.373) / 0.75), 4); //Coolant Temp
202 }
203
204 {
205 CanTxMessage msg(CanCategory::NBC, CAN_VAG_IMMO);
206 msg.setShortValue(0x80, 1);
207 }
208 }
209}
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.