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

187 {
188 if (cycle.isInterval(CI::_10ms)) {
189 {
190 // https://github.com/commaai/opendbc/blob/57c8340a180dd8c75139b18050eb17c72c9cb6e4/vw_golf_mk4.dbc#L394
191 //VAG Dashboard
192 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_1);
193 msg.setShortValue(Sensor::getOrZero(SensorType::Rpm) * 4, 2); //RPM
194 }
195
197
198 {
199 CanTxMessage msg(CanCategory::NBC, CAN_VAG_Motor_2);
200 msg.setShortValue((int) ((clt + 48.373) / 0.75), 1); //Coolant Temp
201 }
202
203 {
204 CanTxMessage msg(CanCategory::NBC, CAN_VAG_CLT_V2);
205 msg.setShortValue((int) ((clt + 48.373) / 0.75), 4); //Coolant Temp
206 }
207
208 {
209 CanTxMessage msg(CanCategory::NBC, CAN_VAG_IMMO);
210 msg.setShortValue(0x80, 1);
211 }
212 }
213}
bool isInterval(CanInterval interval)
Definition can.h:99
static float getOrZero(SensorType type)
Definition sensor.h:87
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.