|
ME 405 Romi
|
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 |
| 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.
| line_task.black_data = list(self.lineSensor.read_Calibrate_Data()) |
Definition at line 78 of file line_task.py.
| bool line_task.got_black = True |
Definition at line 80 of file line_task.py.
| bool line_task.got_white = True |
Definition at line 86 of file line_task.py.
| int line_task.SENSOR_END = 12 |
Definition at line 24 of file line_task.py.
| int line_task.SENSOR_START = 0 |
Definition at line 23 of file line_task.py.
| int line_task.state = 0: |
Definition at line 62 of file line_task.py.
| line_task.white_data = list(self.lineSensor.read_Calibrate_Data()) |
Definition at line 84 of file line_task.py.