Lucas Murray ME 305 Portfolio
Variables
main.py File Reference

Runs all the term project files together. More...

Variables

 main.wFlag = shares.Share()
 Initiates the shared variable for closed loop control toggling.
 
 main.cFlag = shares.Share()
 Initiates the shared variable flag for calibrating the IMU.
 
 main.pFlag = shares.Share(0)
 Initiates the shared variable for panel flags.
 
 main.kFlag = shares.Share(0)
 Initiates the shared variable for panel flags.
 
 main.dFlag = shares.Share(0)
 Initiates the shared variable flag for the data collection and file writing.
 
 main.hFlag = shares.Share()
 Initiates the shared variable flag the haptic feedback from the touch panel calibration.
 
 main.sFlag = shares.Share()
 Initiates the shared variable flag for stopping data collection early.
 
 main.Eang = shares.Share((0, 0, 0))
 Initiates the shared variable for the IMU euler angle data.
 
 main.Vang = shares.Share((0, 0, 0))
 Initiates the shared variable for the IMU angular velocity data.
 
 main.Cart = shares.Share((0, 0, 0, 0, 0))
 Initiates the shared variable for all of the panel touch data.
 
 main.Poxy = shares.Share((0, 0, 0))
 Initiates the shared variable for the panel touch xy position data.
 
 main.Voxy = shares.Share((0, 0, 0))
 Initiates the shared variable for the panel touch xy velocity data.
 
 main.duty = shares.Share((0, 0))
 Initiates the shared variable for the motor duty cycle data.
 
 main.Cast = shares.Share((0, 0, 0, 0))
 Initiates the shared variable for the calibration status data.
 
 main.controlParameters = shares.Share((0, 0, 2.5, 0.2, 0.1))
 Initiates the shared variable for the reference position, velocity and gains for the closed loop controller.
 
list main.taskList
 Stores a list of the MCU functions at the desired frequency to be run simultaneously. More...
 

Detailed Description

Runs all the term project files together.

Acts as a central point or interface for all the term project files to share their values between each other and run through a list of tasks.


Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Term%20Project/main.py

Author
Lucas Murray
Max Cassady
Date
March 17, 2022

Variable Documentation

◆ taskList

list main.taskList
Initial value:
1= [taskUserFcn('taskUser', 50_000, wFlag, cFlag, pFlag, kFlag, dFlag, sFlag, duty, Eang, Vang, controlParameters),
2 taskMotorFcn('taskMotor', 10_000, wFlag, kFlag, hFlag, cFlag, duty, Eang, Vang, Poxy, Voxy, Cart, Cast, controlParameters),
3 taskIMUFcn('taskIMU', 10_100, cFlag, duty, Eang, Vang, Cast),
4 taskPanelFcn('taskPanel', 10_000, pFlag, hFlag, Cart, Poxy, Voxy),
5 taskDataFcn('taskData', 20_000, dFlag, sFlag, Eang, Vang, Cart)]

Stores a list of the MCU functions at the desired frequency to be run simultaneously.