You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reverted back to 255 bytes max payload for display messages, seems that Delphi-Grundig GID doesn't like longer messages
Changed the AC toggle to trigger on long presses instead
Tweaked the logic for blocking Aux frames that are send in the same ISO 15765-2 as status messages (ID 5000)
Copy file name to clipboardExpand all lines: src/CAN.ino
+24-11Lines changed: 24 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
voidOTAhandleTask(void* pvParameters);
4
4
5
5
// CAN-related variables
6
-
volatileuint8_t canISO_frameSpacing=1; // simple implementation of ISO 15765-2 variable frame spacing, based on flow control frames by the receiving node
6
+
volatileuint8_t canISO_frameSpacing=0; // simple implementation of ISO 15765-2 variable frame spacing, based on flow control frames by the receiving node
if(disp_mode!=-1){ // don't bother checking the data if there's no need to update the display
68
-
if(Recvd_CAN_MSG.data[0]==0x10 && (Recvd_CAN_MSG.data[2]==0x40 || Recvd_CAN_MSG.data[2]==0xC0) && Recvd_CAN_MSG.data[5]==0x03 && (disp_mode!=0 || allowDisplayBlocking)){ // another task processes the data since we can't do that here
68
+
if(Recvd_CAN_MSG.data[0]==0x10 && (Recvd_CAN_MSG.data[2]==0x40 || Recvd_CAN_MSG.data[2]==0xC0 || (Recvd_CAN_MSG.data[2]==0x50 && Recvd_CAN_MSG.data[1]==0x4A)) && Recvd_CAN_MSG.data[5]==0x03 && (disp_mode!=0 || allowDisplayBlocking)){ // another task processes the data since we can't do that here
69
69
twai_transmit(&Msg_PreventDisplayUpdate, pdMS_TO_TICKS(30)); // radio blocking msg has to be transmitted ASAP, which is why we skip the queue
70
70
DEBUG_PRINTLN("CAN: Received display update, trying to block");
71
71
twai_read_alerts(&alerts_FlowCtl, pdMS_TO_TICKS(10)); // read stats to a local alert buffer
if(Recvd_CAN_MSG.data[0]==0x10) setFlag(CAN_abortMultiPacket); // let the transmission task know that the radio has transmissed a new first frame -> any ongoing transmission is no longer valid
82
82
}
83
83
vTaskResume(canDisplayTaskHandle); // only retransmit the msg for audio metadata mode and single line coolant, since these don't update frequently
if(RxMsg.data[2]>=0x05){ // properly implemented ECC button counting (such as Vectra C) does not require stupid workarounds
196
+
vTaskResume(canAirConMacroTaskHandle);
197
+
} else {
198
+
if((millis_EccKnobPressed+400)<=millis()){ // late Astra/Corsa/Zafira ECCs don't follow the standard, as these only report the initial press and release (saying it was released after being held for 0ms lol)
199
+
vTaskResume(canAirConMacroTaskHandle); // so we count the time on our own, and if the time elapsed
200
+
}
201
+
}
202
+
}
203
+
}
204
+
} // should be an else here to implement something to stop the macro task, can't be bothered to implement this now
0 commit comments