Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1419 → Rev 1420

/demos/trunk/rtw/sensors.c
38,7 → 38,7
void activate_sensors() {
 
HARD_TASK_MODEL SENSOR_task;
PID DISTANCE_pid,ANGLE_pid,CURVE_pid;
PID DISTANCE_pid,ANGLE_pid,CURVE_pid,WR_pid,WL_pid;
 
hard_task_default_model(SENSOR_task);
hard_task_def_mit(SENSOR_task,60000);
66,10 → 66,26
cprintf("Error: Cannot create RealTime Workshop [CURVE] Task\n");
sys_end();
}
 
hard_task_def_arg(SENSOR_task,(void *)(3));
WR_pid = task_create("WR",SENSOR_body,&SENSOR_task,NULL);
if (WR_pid == NIL) {
cprintf("Error: Cannot create RealTime Workshop [WR] Task\n");
sys_end();
}
 
hard_task_def_arg(SENSOR_task,(void *)(4));
WL_pid = task_create("CURVE",SENSOR_body,&SENSOR_task,NULL);
if (WR_pid == NIL) {
cprintf("Error: Cannot create RealTime Workshop [WL] Task\n");
sys_end();
}
task_activate(DISTANCE_pid);
task_activate(ANGLE_pid);
task_activate(CURVE_pid);
task_activate(WR_pid);
task_activate(WL_pid);
 
}