ME 305
|
Directly interfaces with motors. More...
Functions | |
def | task_motor.taskMotor (taskname, period, motor_drv, mFlag, MFlag, duty, eFlag, mode) |
Task that is in charge of any alterations to drivers or motors. More... | |
Directly interfaces with motors.
Task file to set duty cycle of motor 1 or motor 2. Interfaces with driver.py driver file to interact with the motor. Contains logic to ensure there are no improper duty cycle inputs.
def task_motor.taskMotor | ( | taskname, | |
period, | |||
motor_drv, | |||
mFlag, | |||
MFlag, | |||
duty, | |||
eFlag, | |||
mode | |||
) |
Task that is in charge of any alterations to drivers or motors.
This task sets the duty cycle for both mototr as well as enables driver to allow said motors to operate
taskname | The name of the task |
period | This task is designed to work cooperatively with other tasks. The period is how long it should take for the code to circle back and do this task |
motor_drv | The motor driver name, used to refernce the motors being used in this task |
mFlag | A flag that is active when the m button was pressed in task user. |
MFlag | A flag that is active when the M button was pressed in task user. Holds True or False value dependinf the input from the user in task_user.py. initiates the input duty cycle to motor2 |
duty | A shared variable that hold the duty cycle value for either motor in the driver |
eFlag | A flag that is active when the e button was pressed in task user. Used to tell this task to enable the driver. |