void liner_task(void* _dummy){ //TODO: (REAL TIME) periodic timer initialization // Initialize xLastWakeTime with current ABSOLUTE time. TickType_t xLastWakeTime; xLastWakeTime = xTaskGetTickCount(); //TODO: (REAL TIME) Wait offest vTaskDelayUntil(&xLastWakeTime, OFFSET); // Core of the task = infinite control loop for(;;){ //TODO: here, sample (read) necessary input from the SBC // and 'send' it the lustre program control_I_k1(BatCar.button_pressed()); control_I_sensor_left(BatCar.line_sensor_left()); control_I_sensor_right(BatCar.line_sensor_right()); control_I_odist(BatCar.ultrasonic_sensor_distance()); //TODO: here, call the lustre step control_step(); //N.b. noting to do for outputs, they are sent //to the lustre program via the _O_ procedures //TODO: (REAL TIME) 'sleep' until next peiod vTaskDelayUntil( &xLastWakeTime, PERIOD); } }