Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUTOSTART Alarm with 2 AppModes #37

Open
fbucafusco opened this issue Sep 16, 2017 · 0 comments
Open

AUTOSTART Alarm with 2 AppModes #37

fbucafusco opened this issue Sep 16, 2017 · 0 comments
Labels

Comments

@fbucafusco
Copy link

fbucafusco commented Sep 16, 2017

An AUTOSTART Alarm with 2 appmodes only declares One Appmode into the AutoStartAlarm generated array.

Example:

OIL:
` APPMODE = AppMode1;
APPMODE = AppMode2;

ALARM ActivatePeriodicTask {
COUNTER = HardwareCounter;
ACTION = ACTIVATETASK {
TASK = PeriodicTask;
}
AUTOSTART = TRUE {
APPMODE = AppMode1;
APPMODE = AppMode2;
ALARMTIME = 0;
CYCLETIME = 100;
}
}`

generates (into os_internal_cfg.c):

const AutoStartAlarmType AutoStartAlarm[ALARM_AUTOSTART_COUNT] = { { AppMode1, /* Application Mode */ ActivatePeriodicTask2, /* Alarms */ 0, /* Alarm Time */ 200 /* Alarm Time */ } };

so this portion of StartOS:

for ( loopi = 0; loopi < ALARM_AUTOSTART_COUNT; loopi++ ) { if ( AutoStartAlarm[loopi].Mode == Mode ) { ( void )SetRelAlarm( AutoStartAlarm[loopi].Alarm, AutoStartAlarm[loopi].AlarmTime, AutoStartAlarm[loopi].AlarmCycleTime ); } }

will never start the alarm, for the second AppMode.

@fbucafusco fbucafusco added the bug label Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant