Touch panel task responsible for interfacing with the touch panel using the panel object. More...
Public Member Functions | |
| def | __init__ (self, period_pan, panel_obj, state_vect_x, state_vect_y, calib_pan_flag) |
| Constructs a touch panel task. More... | |
| def | run (self) |
| Runs one iteration of the FSM. | |
| def | transition_to (self, new_state) |
| Transitions the FSM to a new state. More... | |
Public Attributes | |
| period_pan | |
| The frequency of the panel task. More... | |
| panel_obj | |
| The panel driver object. More... | |
| calib_pan_flag | |
| A boolean flag used to start touch panel calibration. More... | |
| state_vect_x | |
| A shared list used to define state vector x. More... | |
| state_vect_y | |
| A shared list used to define state vector y. More... | |
| state | |
| Sets initial state to State 0. More... | |
| runs | |
| Sets the number of runs to 0. More... | |
| next_time | |
| The utime.ticks_us() value associated with the next run of the FSM. More... | |
| first_pos_x | |
| Initializes x position variable. More... | |
| first_pos_y | |
| Initializes y position variable. More... | |
| positions | |
| Object associated with position read by touch panel. More... | |
| second_pos_x | |
| Defines x position variable read after position changes. More... | |
| second_pos_y | |
| Defines y position variable read after position changes. More... | |
| x_velocity | |
| Calculates x velocity after position changes. More... | |
| y_velocity | |
| Calculates y velocity after position changes. More... | |
Touch panel task responsible for interfacing with the touch panel using the panel object.
Implements a finite state machine for touch panel
| def LabFF_task_panel.Task_Panel.__init__ | ( | self, | |
| period_pan, | |||
| panel_obj, | |||
| state_vect_x, | |||
| state_vect_y, | |||
| calib_pan_flag | |||
| ) |
Constructs a touch panel task.
Touch panel task attributes include the period, panel object, state vectors, and panel flag for calibration
| period_pan | The period, in microseconds, between runs of the panel task |
| panel_obj | The panel object of the touch panel driver class |
| state_vect_x | List used to define state vector x |
| state_vect_y | List used to define state vector y |
| calib_pan_flag | A boolean flag used to enable touch panel calibration |
| def LabFF_task_panel.Task_Panel.transition_to | ( | self, | |
| new_state | |||
| ) |
Transitions the FSM to a new state.
A function that transitions the FSM to a new state
| new_state | The state to transition to |
| LabFF_task_panel.Task_Panel.calib_pan_flag |
A boolean flag used to start touch panel calibration.
Works with the task panel and user interface to enable resistive touch panel calibration
| LabFF_task_panel.Task_Panel.first_pos_x |
Initializes x position variable.
Continuously updated to calculate positional velocity in x-direction
| LabFF_task_panel.Task_Panel.first_pos_y |
Initializes y position variable.
Continuously updated to calculate positional velocity in y-direction
| LabFF_task_panel.Task_Panel.next_time |
The utime.ticks_us() value associated with the next run of the FSM.
Defines a variable that adds the period to the ongoing timer
| LabFF_task_panel.Task_Panel.panel_obj |
The panel driver object.
This panel driver was defined in the main.py file
| LabFF_task_panel.Task_Panel.period_pan |
The frequency of the panel task.
Variable that specifies timer frequency
| LabFF_task_panel.Task_Panel.positions |
Object associated with position read by touch panel.
Uses panel object to update state vectors
| LabFF_task_panel.Task_Panel.runs |
Sets the number of runs to 0.
Defines a variable to keep track of runs
| LabFF_task_panel.Task_Panel.second_pos_x |
Defines x position variable read after position changes.
Continuously updated to calculate positional velocity in x-direction
| LabFF_task_panel.Task_Panel.second_pos_y |
Defines y position variable read after position changes.
Continuously updated to calculate positional velocity in y-direction
| LabFF_task_panel.Task_Panel.state |
Sets initial state to State 0.
FSM starts at State 0, where user input is prompted for further action
| LabFF_task_panel.Task_Panel.state_vect_x |
A shared list used to define state vector x.
Contains variables for x position, theta y, x velocity, and angular velocity (theta y dot)
| LabFF_task_panel.Task_Panel.state_vect_y |
A shared list used to define state vector y.
Contains variables for y position, theta x, y velocity, and angular velocity (theta x dot)
| LabFF_task_panel.Task_Panel.x_velocity |
Calculates x velocity after position changes.
Change in x position over task period
| LabFF_task_panel.Task_Panel.y_velocity |
Calculates y velocity after position changes.
Change in y position over task period