IQ.Pilot Release Commit @ 4521b0f
This commit is contained in:
@@ -191,6 +191,10 @@ void ignition_can_hook(CANPacket_t *msg) {
|
||||
static int toyota_gear = TOYOTA_GEAR_P;
|
||||
static int toyota_hybrid_gear = TOYOTA_HYBRID_GEAR_P;
|
||||
static bool toyota_hybrid_gear_seen = false;
|
||||
static bool vw_meb_seen = false;
|
||||
static bool vw_meb_getriebe_out_of_p = false;
|
||||
static bool vw_meb_gateway_out_of_p = false;
|
||||
static int prev_counter_vw_meb = -1;
|
||||
|
||||
// GM exception
|
||||
if ((msg->addr == 0x1F1U) && (len == 8)) {
|
||||
@@ -293,6 +297,30 @@ void ignition_can_hook(CANPacket_t *msg) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((msg->addr == 0xADU) && (len == 8)) {
|
||||
int fahrstufe = (msg->data[5] >> 2) & 0xFU;
|
||||
vw_meb_getriebe_out_of_p = (fahrstufe >= 6) && (fahrstufe <= 14);
|
||||
}
|
||||
|
||||
if ((msg->addr == 0x3DCU) && (len == 8)) {
|
||||
int fahrstufe = msg->data[5] & 0xFU;
|
||||
vw_meb_gateway_out_of_p = (fahrstufe >= 6) && (fahrstufe <= 14);
|
||||
}
|
||||
|
||||
if ((msg->addr == 0x13DU) && (len == 32)) {
|
||||
vw_meb_seen = true;
|
||||
}
|
||||
|
||||
if ((msg->addr == 0x3C0U) && (len == 4) && vw_meb_seen) {
|
||||
int counter = msg->data[1] & 0xFU;
|
||||
if ((counter == ((prev_counter_vw_meb + 1) % 16)) && (prev_counter_vw_meb != -1)) {
|
||||
bool vw_meb_out_of_park = vw_meb_getriebe_out_of_p || vw_meb_gateway_out_of_p;
|
||||
ignition_can = (((msg->data[2] >> 1) & 1U) != 0U) && vw_meb_out_of_park;
|
||||
ignition_can_cnt = 0U;
|
||||
ignition_can_gates_line = true;
|
||||
}
|
||||
prev_counter_vw_meb = counter;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user