Lucas Murray ME 305 Portfolio
|
Runs tasks sent by the taskUser file and keeps the IMU measurement data updated. More...
Functions | |
def | taskIMU.taskIMUFcn (taskName, period, cFlag, duty, Eang, Vang, Cast) |
Controls the IMU as determined by the taskUser file. More... | |
Runs tasks sent by the taskUser file and keeps the IMU measurement data updated.
Acts as a background function file controlling the IMU for the primary user interface so that the user interface does not have to perform IMU updating directly. It will provide the euler angle and angular velocity as a shared variable for use in other files and can calibrate the IMU when told to by the user task. It will continuously update the IMU every 10 milliseconds when run from main.
The State Transition Diagram for taskIMU can be seen here.
Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Lab%200x05/taskIMU.py
def taskIMU.taskIMUFcn | ( | taskName, | |
period, | |||
cFlag, | |||
duty, | |||
Eang, | |||
Vang, | |||
Cast | |||
) |
Controls the IMU as determined by the taskUser file.
Interfaces with the taskUser file through the use of the shared flag and tuple parameters, keeping the IMU updated and performing calibration when told to.
taskName | The name of the task a string |
period | The period of the task in microseconds as an integer |
cFlag | Boolean variable shared between taskUser and taskIMU for the IMU calibration command |
duty | Tuple data shared between taskUser and taskEncoder for the motor duty |
Eang | Tuple shared between taskUser and taskEncoder that stores the euler angle data from the IMU |
Vang | Tuple shared between taskUser and taskEncoder that stores the angular velocity data from the IMU |
Cast | Tuple shared between taskUser and taskEncoder that would have allowed for the automated calibration of the IMU |