Commit e28c679f authored by Marcus Nordenberg's avatar Marcus Nordenberg Committed by Esteban Blanc

rt_plc_thread: use enum for delay action

(cherry picked from commit 4e173a8e4f24eb8305b6a52f83005d62ddc770e5)
parent 8ec7aac3
...@@ -732,10 +732,11 @@ static void scan(plc_sThread* tp) ...@@ -732,10 +732,11 @@ static void scan(plc_sThread* tp)
if (tp->csup_lh != NULL) { if (tp->csup_lh != NULL) {
pwr_tTime now; pwr_tTime now;
time_GetTime(&now); time_GetTime(&now);
delay_action delay_action =
= csup_Exec(&sts, tp->csup_lh, (pwr_tDeltaTime*)&tp->sync_time, csup_Exec(&sts, tp->csup_lh, (pwr_tDeltaTime*)&tp->sync_time,
(pwr_tDeltaTime*)&tp->after_scan, &now); (pwr_tDeltaTime*)&tp->after_scan, &now);
if (delay_action == 2) { if (delay_action == pwr_eSupDelayActionEnum_EmergencyBreak)
{
int prev_rwflag = pp->IOHandler->IOReadWriteFlag; int prev_rwflag = pp->IOHandler->IOReadWriteFlag;
pp->IOHandler->IOReadWriteFlag = FALSE; pp->IOHandler->IOReadWriteFlag = FALSE;
pp->Node->EmergBreakTrue = TRUE; pp->Node->EmergBreakTrue = TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment