Обновление платы на V2
This commit is contained in:
parent
55711f3774
commit
fea15f24e8
|
|
@ -102,7 +102,7 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
|
||||||
env->time_CCU_HVC_Req_Msg = env->timeMs + CCU_HVC_Req_Msg_CYC;
|
env->time_CCU_HVC_Req_Msg = env->timeMs + CCU_HVC_Req_Msg_CYC;
|
||||||
|
|
||||||
// Rolling Counter [0 - 15]
|
// Rolling Counter [0 - 15]
|
||||||
if (env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC > 15) {
|
if (env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC >= 15) {
|
||||||
env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC = 0;
|
env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC = 0;
|
||||||
} else {
|
} else {
|
||||||
++env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC;
|
++env->CCU_HVC_Req_Msg_CCU_HVC_Req_RC;
|
||||||
|
|
@ -174,12 +174,15 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
|
||||||
env->time_CCU_Msg1 = env->timeMs + CCU_Msg1_CYC;
|
env->time_CCU_Msg1 = env->timeMs + CCU_Msg1_CYC;
|
||||||
|
|
||||||
// Rolling Counter [0 - 15]
|
// Rolling Counter [0 - 15]
|
||||||
if (ccu_candb_tx.CCU_Msg1.CCU_MSG1_RC > 15) {
|
if (env->CCU_Msg1_CCU_MSG1_RC >= 15) {
|
||||||
ccu_candb_tx.CCU_Msg1.CCU_MSG1_RC = 0;
|
env->CCU_Msg1_CCU_MSG1_RC = 0;
|
||||||
} else {
|
} else {
|
||||||
++ccu_candb_tx.CCU_Msg1.CCU_MSG1_RC;
|
++env->CCU_Msg1_CCU_MSG1_RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ccu_candb_tx.CCU_Msg1.CCU_MSG1_RC = env->CCU_Msg1_CCU_MSG1_RC;
|
||||||
|
|
||||||
|
|
||||||
// Checksum XOR8 of the data field this message
|
// Checksum XOR8 of the data field this message
|
||||||
// Checksum computed as per XOR algorithm:
|
// Checksum computed as per XOR algorithm:
|
||||||
// Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.)
|
// Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.)
|
||||||
|
|
@ -217,7 +220,7 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
|
||||||
env->time_CCU_Msg3 = env->timeMs + CCU_Msg3_CYC;
|
env->time_CCU_Msg3 = env->timeMs + CCU_Msg3_CYC;
|
||||||
|
|
||||||
// Rolling Counter [0 - 15]
|
// Rolling Counter [0 - 15]
|
||||||
if (env->CCU_Msg3_CCU_MSG3_RC > 15) {
|
if (env->CCU_Msg3_CCU_MSG3_RC >= 15) {
|
||||||
env->CCU_Msg3_CCU_MSG3_RC = 0;
|
env->CCU_Msg3_CCU_MSG3_RC = 0;
|
||||||
} else {
|
} else {
|
||||||
++env->CCU_Msg3_CCU_MSG3_RC;
|
++env->CCU_Msg3_CCU_MSG3_RC;
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ typedef struct {
|
||||||
uint32_t time_CCU_AC_Ctrl;
|
uint32_t time_CCU_AC_Ctrl;
|
||||||
|
|
||||||
uint8_t CCU_HVC_Req_Msg_CCU_HVC_Req_RC;
|
uint8_t CCU_HVC_Req_Msg_CCU_HVC_Req_RC;
|
||||||
|
uint8_t CCU_Msg1_CCU_MSG1_RC;
|
||||||
uint8_t CCU_Msg3_CCU_MSG3_RC;
|
uint8_t CCU_Msg3_CCU_MSG3_RC;
|
||||||
|
|
||||||
bool isMute;
|
bool isMute;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue