diff --git a/LinActuatorTasks.c b/LinActuatorTasks.c index 2119425..a093e5a 100644 --- a/LinActuatorTasks.c +++ b/LinActuatorTasks.c @@ -555,7 +555,7 @@ static bool setState20(tLinTaskActuator *env, bool isError, uint8_t index) { env->linCommandActuator[j].COM = LIN_ACT_CFR_SUCCESSFUL; env->linCommandActuator[j].isRFR_STA = 1; - env->linStateActuator[index].Stall_Slave = LIN_STALL_STA_OFF; + env->linStateActuator[j].Stall_Slave = LIN_STALL_STA_OFF; if (isError) { env->linStateActuator[j].error_connect = 1; @@ -571,10 +571,12 @@ static bool setState20(tLinTaskActuator *env, bool isError, uint8_t index) { return false; } +#if (LOG_LIN_ACTUATOR == 1) #define IS_LOGGING_ENABLED(numAct) \ ( (numAct == 1 && LOG_LIN1_ACTUATOR == 1) || \ (numAct == 2 && LOG_LIN2_ACTUATOR == 1) || \ (numAct == 3 && LOG_LIN3_ACTUATOR == 1) ) +#endif static lin_event_id_t Lin_Scheduler(tLinTaskActuator *env, uint8_t numAct) { @@ -743,6 +745,7 @@ static lin_event_id_t Lin_Scheduler(tLinTaskActuator *env, uint8_t numAct) { env->linCommandActuator[i].MODE) } #endif + setState20(env, false, i); continue; } @@ -798,6 +801,7 @@ static lin_event_id_t Lin_Scheduler(tLinTaskActuator *env, uint8_t numAct) { env->linCommandActuator[i].POS) } #endif + setState20(env, false, i); continue; } @@ -856,6 +860,7 @@ static lin_event_id_t Lin_Scheduler(tLinTaskActuator *env, uint8_t numAct) { env->linCommandActuator[i].Coils_Stop_SET) } #endif + setState20(env, false, i); continue; } diff --git a/LinActuatorTasks.h b/LinActuatorTasks.h index ca2c6e5..26fd890 100644 --- a/LinActuatorTasks.h +++ b/LinActuatorTasks.h @@ -12,8 +12,8 @@ #define LOG_LIN_ACTUATOR 1 #define LOG_LIN1_ACTUATOR 1 -#define LOG_LIN2_ACTUATOR 0 -#define LOG_LIN3_ACTUATOR 0 +#define LOG_LIN2_ACTUATOR 1 +#define LOG_LIN3_ACTUATOR 1 typedef struct __attribute__ ((packed)) {