Обновление платы на V2

This commit is contained in:
cfif 2026-06-08 11:21:00 +03:00
parent 5b636f4d59
commit 55711f3774
2 changed files with 7 additions and 4 deletions

View File

@ -217,12 +217,14 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
env->time_CCU_Msg3 = env->timeMs + CCU_Msg3_CYC;
// Rolling Counter [0 - 15]
if (ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC > 15) {
ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC = 0;
if (env->CCU_Msg3_CCU_MSG3_RC > 15) {
env->CCU_Msg3_CCU_MSG3_RC = 0;
} else {
++ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC;
++env->CCU_Msg3_CCU_MSG3_RC;
}
ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC = env->CCU_Msg3_CCU_MSG3_RC;
// Checksum XOR8 of the data field this message
// Checksum computed as per XOR algorithm:
// Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.)

View File

@ -20,7 +20,7 @@
#define CCU_VCU_Msg1_SEND 0
#define CCU_VCU_Msg2_SEND 0
#define CCU_Msg1_SEND 0
#define CCU_Msg3_SEND 0
#define CCU_Msg3_SEND 1
#define CU_AC_Ctrl_SEND 0
@ -62,6 +62,7 @@ typedef struct {
uint32_t time_CCU_AC_Ctrl;
uint8_t CCU_HVC_Req_Msg_CCU_HVC_Req_RC;
uint8_t CCU_Msg3_CCU_MSG3_RC;
bool isMute;