Обновление 23.06.2026
This commit is contained in:
parent
4f9418d433
commit
060402272f
|
|
@ -35,7 +35,7 @@ static void sendEventToCan(tCanSpamTransmitter *env) {
|
|||
env->canFrame.standard_id = env->can_id;
|
||||
}
|
||||
|
||||
env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t *) &env->canFrame.data, env->canFrame.dlc,
|
||||
env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t * ) & env->canFrame.data, env->canFrame.dlc,
|
||||
env->can_id, env->canFrame.id_type, 100);
|
||||
}
|
||||
|
||||
|
|
@ -117,10 +117,10 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
|
|||
// Checksum computed as per XOR algorithm:
|
||||
// Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.)
|
||||
|
||||
uint8_t d0 = (uint8_t) ((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_eCompSpeedReq_Val_ro & (0xFFU)));
|
||||
uint8_t d1 = (uint8_t) ((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_eCompReq_Stat & (0x01U)) |
|
||||
((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_LowTempValve_Req & (0x03U)) << 1U) |
|
||||
((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_HVC_Req_RC & (0x0FU)) << 4U));
|
||||
uint8_t d0 = (uint8_t)((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_eCompSpeedReq_Val_ro & (0xFFU)));
|
||||
uint8_t d1 = (uint8_t)((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_eCompReq_Stat & (0x01U)) |
|
||||
((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_LowTempValve_Req & (0x03U)) << 1U) |
|
||||
((ccu_candb_tx.CCU_HVC_Req_Msg.CCU_HVC_Req_RC & (0x0FU)) << 4U));
|
||||
|
||||
ccu_candb_tx.CCU_HVC_Req_Msg.CCU_HVC_Req_CS = d0 ^ d1;
|
||||
|
||||
|
|
@ -234,10 +234,10 @@ static eTimeEventTransmit isEventTransmitter(tCanSpamTransmitter *env) {
|
|||
// Checksum computed as per XOR algorithm:
|
||||
// Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.)
|
||||
|
||||
uint8_t d0 = (uint8_t) ((ccu_candb_tx.CCU_Msg3.CCU_FAN_Req & (0x7FU)));
|
||||
uint8_t d1 = (uint8_t) ((ccu_candb_tx.CCU_Msg3.CCU_RestMode_Stat & (0x03U)));
|
||||
uint8_t d2 = (uint8_t) ((ccu_candb_tx.CCU_Msg3.CCU_IncarTempSum_Val_ro & (0xFFU)));
|
||||
uint8_t d3 = (uint8_t) ((ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC & (0x0FU)));
|
||||
uint8_t d0 = (uint8_t)((ccu_candb_tx.CCU_Msg3.CCU_FAN_Req & (0x7FU)));
|
||||
uint8_t d1 = (uint8_t)((ccu_candb_tx.CCU_Msg3.CCU_RestMode_Stat & (0x03U)));
|
||||
uint8_t d2 = (uint8_t)((ccu_candb_tx.CCU_Msg3.CCU_IncarTempSum_Val_ro & (0xFFU)));
|
||||
uint8_t d3 = (uint8_t)((ccu_candb_tx.CCU_Msg3.CCU_MSG3_RC & (0x0FU)));
|
||||
|
||||
ccu_candb_tx.CCU_Msg3.CCU_MSG3_CS = d0 ^ d1 ^ d2 ^ d3;
|
||||
|
||||
|
|
@ -300,9 +300,9 @@ static _Noreturn void CanSpamTransmitter_Thread(tCanSpamTransmitter *env) {
|
|||
|
||||
SystemDelayMs(100);
|
||||
|
||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||
if (env->isMute == false) {
|
||||
|
||||
if (env->isMute == false) {
|
||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||
|
||||
env->timeMs += 100;
|
||||
|
||||
|
|
@ -310,13 +310,13 @@ static _Noreturn void CanSpamTransmitter_Thread(tCanSpamTransmitter *env) {
|
|||
sendEventToCan(env);
|
||||
}
|
||||
|
||||
|
||||
osMutexRelease(env->access);
|
||||
} else {
|
||||
LoggerErrorStatic(LOGGER, LOG_SIGN, "Access error CanSpamTransmitter_Thread");
|
||||
}
|
||||
|
||||
osMutexRelease(env->access);
|
||||
} else {
|
||||
LoggerErrorStatic(LOGGER, LOG_SIGN, "Access error CanSpamTransmitter_Thread");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue