Обновление после командировки 30.06.2026
This commit is contained in:
parent
9e472015db
commit
443413732c
|
|
@ -25,7 +25,7 @@ void CanSpamReceiver_Init(tCanSpamReceiver *env,
|
|||
|
||||
static void ListenCanSpamReceiver(tCanSpamReceiver *env) {
|
||||
|
||||
uint16_t recv = env->ioCanFrame->receive(env->ioCanFrame->env, PROTOCOL_CAN_RAW, (uint8_t * ) & env->canFrame, 1,
|
||||
uint16_t recv = env->ioCanFrame->receive(env->ioCanFrame->env, PROTOCOL_CAN_RAW, (uint8_t *) &env->canFrame, 1,
|
||||
1000);
|
||||
|
||||
if (recv == 0) {
|
||||
|
|
@ -51,6 +51,26 @@ static void ListenCanSpamReceiver(tCanSpamReceiver *env) {
|
|||
|
||||
}
|
||||
|
||||
bool get_is_NoNull_CanSpam_BCM_PowerTrain_Receiver(tCanSpamReceiver *env) {
|
||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||
|
||||
uint8_t *data = (uint8_t *) &ccu_candb_rx.BCM_Powertrain;
|
||||
|
||||
for (uint8_t i = 0; i < (uint8_t)sizeof(BCM_Powertrain_t); ++i) {
|
||||
if (data[i] != 0) {
|
||||
osMutexRelease(env->access);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
osMutexRelease(env->access);
|
||||
} else {
|
||||
LoggerErrorStatic(LOGGER, LOG_SIGN, "Access error get_CanSpamReceiver");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void get_CanSpamReceiver(tCanSpamReceiver *env) {
|
||||
if (osMutexAcquire(env->access, 5000) == osOK) {
|
||||
memcpy(&rtDW.TM_CP_model, &ccu_candb_rx.TM_CP, sizeof(rtDW.TM_CP_model));
|
||||
|
|
|
|||
|
|
@ -34,4 +34,6 @@ void CanSpamReceiver_StartThread(tCanSpamReceiver *env);
|
|||
|
||||
void get_CanSpamReceiver(tCanSpamReceiver *env);
|
||||
|
||||
bool get_is_NoNull_CanSpam_BCM_PowerTrain_Receiver(tCanSpamReceiver *env);
|
||||
|
||||
#endif //HVAC_CAN_SPAM_RECEIVER_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue