ME 305 Group 6 Documentation
|
Creates and operates the IMU. More...
Functions | |
def | taskIMU.taskIMUFcn (str taskName, int period, shares.Share euler_angles, shares.Share angular_velocities, shares.Share imu_calib_status, PrintQueue print_queue) |
Task for operating the IMU. More... | |
def | taskIMU.testPrint (int period, shares.Share euler_angles, shares.Share angular_velocities, shares.Share imu_calib_status) |
Simple printing task for the testing suite. More... | |
Variables | |
taskIMU.S0_INIT = micropython.const(0) | |
State 0. More... | |
taskIMU.S1_CALIB = micropython.const(1) | |
State 1. More... | |
taskIMU.S2_RUN = micropython.const(2) | |
State 2. More... | |
taskIMU.euler_angles = shares.Share(None) | |
Euler angles share for the testing suite. | |
taskIMU.angular_velocities = shares.Share(None) | |
Angular velocities share for the testing suite. | |
taskIMU.imu_calib_status = shares.Share(False) | |
Calibration status variable for the testing suite. | |
taskIMU.print_queue = PrintQueue() | |
Print queue for testing suite. | |
list | taskIMU.task_list |
Initialization of tasks for test suite. More... | |
Creates and operates the IMU.
Instantiates an I2C device for and IMU (BNO055 in particular). The pyBoard is set as the controller by default and the IMU is set to NDOF mode by default. A state diagram of the task can be seen below.
def taskIMU.taskIMUFcn | ( | str | taskName, |
int | period, | ||
shares.Share | euler_angles, | ||
shares.Share | angular_velocities, | ||
shares.Share | imu_calib_status, | ||
PrintQueue | print_queue | ||
) |
Task for operating the IMU.
Finite state machine that controls IMU creation, calibration, and operation.
taskName | Brief string to describe the instance of the function. Useful for debug purposes. |
period | Period with which to run the function and update/execute state logic. |
euler_angles | Shared variable to pass euler angles to other tasks |
angular_velocities | Shared variable to pass angular velocities to other tasks |
imu_calib_status | Shared variable to pass IMU calibration status to other tasks |
print_queue | A print queue object to pass print jobs to the taskUser function to be printed |
def taskIMU.testPrint | ( | int | period, |
shares.Share | euler_angles, | ||
shares.Share | angular_velocities, | ||
shares.Share | imu_calib_status | ||
) |
Simple printing task for the testing suite.
Simple printing task for the testing suite. Emulates functionality found in taskUser
period | Rate to run the print function |
euler_angles | Share variable to pass euler angles to emulate main program |
angular_velocities | Shared variable to pass angular velocities to emulate main program |
imu_calib_status | Shared variable to pass imu calibration status to emulate main program |
taskIMU.S0_INIT = micropython.const(0) |
State 0.
Descriptive name for State 0, the initializing state.
taskIMU.S1_CALIB = micropython.const(1) |
State 1.
Descriptive name for State 1, the calibration state.
taskIMU.S2_RUN = micropython.const(2) |
State 2.
Descriptive name for State 2, the run state.
list taskIMU.task_list |
Initialization of tasks for test suite.