This module is a FSM implementation of the motor task used to power the two dc motors. More...
Functions | |
def | ME405_FP_MotorTask.motorTaskFun () |
This generator function is an FSM implementation of the motor task used to control the motors. More... | |
This module is a FSM implementation of the motor task used to power the two dc motors.
The motor task recieves duty cycles for each motor from the controller task and enables and disables the motor board when the user task updates ME405_FP_Shares.enabledShare. The motor task is structured as a finite state machine so that it can handle input from the user task as well as handling motor faults. The state transition diagram is shown below:
source code: https://bitbucket.org/eliotBriefer/me405_term_project/src/master/Tasks/ME405_FP_MotorTask.py
def ME405_FP_MotorTask.motorTaskFun | ( | ) |
This generator function is an FSM implementation of the motor task used to control the motors.
This task uses two motor driver objects to set the duty cycle of the x and y motors using PWM. The duty cycle of each motor is a shared variable that is updated by the controller task and read by this task.