|
ME 405 Romi
|
line_task class that can be initialized to be run with the cotask scheduler. More...
Public Member Functions | |
| __init__ (self, lineSensor, l_state, need_Calibrate, ready_Black, ready_White, centroid) | |
Public Attributes | |
| lineSensor = lineSensor | |
| l_state = l_state | |
| int | state = 0 |
| need_Cal = need_Calibrate | |
| ready_Black = ready_Black | |
| ready_White = ready_White | |
| centroid = centroid | |
| list | black_data = [0.0]*13 |
| list | white_data = [0.0]*13 |
| bool | got_black = False |
| bool | got_white = False |
line_task class that can be initialized to be run with the cotask scheduler.
See run for behavior.
init is the line_task object initializer which takes 6 arguments. The arguments are a mix of hardware drivers and share flags.
| line_sensor | : line_sensor is the line_sensor object made in main. It is the sensor this task is reading. |
| l_state | : l_state is not actually used |
| need_Calibrate | : need_Calibrate is an integer share flag that tells control task whether the IR sensors are calibrated and control task is ok to start line following. It is set by the line sensor task. |
| ready_Black | : ready_Black is an integer share flag that UI task will set true when the ROMI is over a black surface for calibration. |
| ready_White | : ready_White is an integer share flag that UI task will set true when the ROMI is over a white surface for calibration. |
| centroid | : centroid is a float share that the line sensor task fills with the current location of the line that ROMI is following. It is used for the automatic line following mode in control task. |
Definition at line 27 of file line_task.py.
| line_task.line_task.__init__ | ( | self, | |
| lineSensor, | |||
| l_state, | |||
| need_Calibrate, | |||
| ready_Black, | |||
| ready_White, | |||
| centroid ) |
Definition at line 28 of file line_task.py.
| list line_task.line_task.black_data = [0.0]*13 |
Definition at line 36 of file line_task.py.
| line_task.line_task.centroid = centroid |
Definition at line 35 of file line_task.py.
| bool line_task.line_task.got_black = False |
Definition at line 38 of file line_task.py.
| bool line_task.line_task.got_white = False |
Definition at line 39 of file line_task.py.
| line_task.line_task.l_state = l_state |
Definition at line 30 of file line_task.py.
| line_task.line_task.lineSensor = lineSensor |
Definition at line 29 of file line_task.py.
| line_task.line_task.need_Cal = need_Calibrate |
Definition at line 32 of file line_task.py.
| line_task.line_task.ready_Black = ready_Black |
Definition at line 33 of file line_task.py.
| line_task.line_task.ready_White = ready_White |
Definition at line 34 of file line_task.py.
| int line_task.line_task.state = 0 |
Definition at line 31 of file line_task.py.
| list line_task.line_task.white_data = [0.0]*13 |
Definition at line 37 of file line_task.py.