Luisa Chiu Portfolio
LabFF_task_panel.Task_Panel Class Reference

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...
 

Detailed Description

Touch panel task responsible for interfacing with the touch panel using the panel object.

Implements a finite state machine for touch panel

Constructor & Destructor Documentation

◆ __init__()

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

Parameters
period_panThe period, in microseconds, between runs of the panel task
panel_objThe panel object of the touch panel driver class
state_vect_xList used to define state vector x
state_vect_yList used to define state vector y
calib_pan_flagA boolean flag used to enable touch panel calibration

Member Function Documentation

◆ transition_to()

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

Parameters
new_stateThe state to transition to

Member Data Documentation

◆ calib_pan_flag

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

◆ first_pos_x

LabFF_task_panel.Task_Panel.first_pos_x

Initializes x position variable.

Continuously updated to calculate positional velocity in x-direction

◆ first_pos_y

LabFF_task_panel.Task_Panel.first_pos_y

Initializes y position variable.

Continuously updated to calculate positional velocity in y-direction

◆ next_time

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

◆ panel_obj

LabFF_task_panel.Task_Panel.panel_obj

The panel driver object.

This panel driver was defined in the main.py file

◆ period_pan

LabFF_task_panel.Task_Panel.period_pan

The frequency of the panel task.

Variable that specifies timer frequency

◆ positions

LabFF_task_panel.Task_Panel.positions

Object associated with position read by touch panel.

Uses panel object to update state vectors

◆ runs

LabFF_task_panel.Task_Panel.runs

Sets the number of runs to 0.

Defines a variable to keep track of runs

◆ second_pos_x

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

◆ second_pos_y

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

◆ state

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

◆ state_vect_x

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)

◆ state_vect_y

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)

◆ x_velocity

LabFF_task_panel.Task_Panel.x_velocity

Calculates x velocity after position changes.

Change in x position over task period

◆ y_velocity

LabFF_task_panel.Task_Panel.y_velocity

Calculates y velocity after position changes.

Change in y position over task period


The documentation for this class was generated from the following file: