ME 405 Romi
Loading...
Searching...
No Matches
line_task Namespace Reference

Classes

class  line_task
 line_task class that can be initialized to be run with the cotask scheduler. More...

Functions

 run (self)
 run is the generator that the cotask scheduler will run since our tasks are objects.

Variables

int SENSOR_START = 0
int SENSOR_END = 12
int state = 0:
 black_data = list(self.lineSensor.read_Calibrate_Data())
bool got_black = True
 white_data = list(self.lineSensor.read_Calibrate_Data())
bool got_white = True

Function Documentation

◆ run()

line_task.run ( self)

run is the generator that the cotask scheduler will run since our tasks are objects.

All shares it needs are already given to the task object on initialization. The generator will only run one state at a time on each run of the task. @detail The finite state machine for control_task has 4 states. State 0: Check calibration state State 1: Calibrating state. Creates the calibration file State 2: Calibrated/Reading state. This is the final running state that line_task will sit in filling centroid forever once its calibrated State 3: Calibration check state. Come here to check if the sensor is reading the file

Definition at line 58 of file line_task.py.

Variable Documentation

◆ black_data

line_task.black_data = list(self.lineSensor.read_Calibrate_Data())

Definition at line 78 of file line_task.py.

◆ got_black

bool line_task.got_black = True

Definition at line 80 of file line_task.py.

◆ got_white

bool line_task.got_white = True

Definition at line 86 of file line_task.py.

◆ SENSOR_END

int line_task.SENSOR_END = 12

Definition at line 24 of file line_task.py.

◆ SENSOR_START

int line_task.SENSOR_START = 0

Definition at line 23 of file line_task.py.

◆ state

int line_task.state = 0:

Definition at line 62 of file line_task.py.

◆ white_data

line_task.white_data = list(self.lineSensor.read_Calibrate_Data())

Definition at line 84 of file line_task.py.