Lucas Murray ME 305 Portfolio
|
Runs a user interface for someone to run the encoder. More...
Functions | |
def | taskUser_F.taskUserFcn (taskName, period, wFlag, cFlag, pFlag, kFlag, dFlag, sFlag, duty, Eang, Vang, controlParameters) |
A generator to implement the UI task as an FSM. More... | |
def | taskUser_F.printUI () |
Prints the command screen for the user interface. | |
Runs a user interface for someone to run the encoder.
Uses a function to accept user input and run the desired method. Uses the shared variables to read data written by the encoder and motor tasks and to send flags that will tell either of the functions to perform a certain action.
The State Transition Diagram for taskUser can be seen here.
Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Term%20Project/taskUser_F.py
def taskUser_F.taskUserFcn | ( | taskName, | |
period, | |||
wFlag, | |||
cFlag, | |||
pFlag, | |||
kFlag, | |||
dFlag, | |||
sFlag, | |||
duty, | |||
Eang, | |||
Vang, | |||
controlParameters | |||
) |
A generator to implement the UI task as an FSM.
The task runs as a generator function and requires a task name, interval and zFlag status to be specified.
taskName | The name of the task as a string. |
period | The task interval or period specified as an integer number of microseconds. |
wFlag | Boolean variable shared between taskUser and taskMotor for the closed loop control toggle command |
cFlag | Boolean variable shared between taskUser and taskIMU for the IMU calibration command |
pFlag | Tuple variable shared between taskUser and taskPanel for the calibration and read commands |
kFlag | Tuple variable shared between taskUser and taskMotor for the change gains command |
dFlag | Tuple variable shared between taskUser and taskData for the collect data command |
sFlag | Boolean variable shared between taskUser and taskData for the stop data collection early command |
duty | Tuple shared between taskUser and taskMotor that stores the input duty value |
Eang | Tuple shared between taskIMU, taskUser, taskData, and taskMotor that stores euler angle values |
Vang | Tuple shared between taskIMU, taskUser, taskData, and taskMotor that stores angular velocity values |
controlParameters | Tuple shared between taskUser and taskMotor that stores the input reference velocity and proportional gain |