Fault Section. More...
Public Member Functions | |
| def | __init__ (self, nFault_pin, motor1, motor2) |
| Initialization section. More... | |
| def | faultISR (self) |
| Fault pin ISR. More... | |
| def | UnFaultISR (self) |
| Fault pin ISR. More... | |
| def | enableMotors (self) |
| Enable both motors method. More... | |
Public Attributes | |
| motor1 | |
| motor2 | |
| faultPin | |
| motors | |
Fault Section.
Sets up our fault pin ISR and saves motors with names then calls methods from the DCMotor Class to enable and disable them
| def motorDriver.MotorBase.__init__ | ( | self, | |
| nFault_pin, | |||
| motor1, | |||
| motor2 | |||
| ) |
Initialization section.
Saves the parameters as self. variables in order to be used in other parts of the code. Also sets the fault pin and enables the external interrupts.
| nFault_pin | fault detection pin [IN] |
| motor1 | DC motor 1 |
| motor2 | DC motor 2 |
| def motorDriver.MotorBase.enableMotors | ( | self | ) |
Enable both motors method.
Calls on the enable method from the DCMotor class in order to allow both motors to be turned on.
| None |
| def motorDriver.MotorBase.faultISR | ( | self | ) |
Fault pin ISR.
Interrupt service routine to handle cases where the nFAULT bit has been tripped. To resume operation the motor must be re-enabled
| None |
| def motorDriver.MotorBase.UnFaultISR | ( | self | ) |
Fault pin ISR.
Interrupt service routine to handle cases where the nFAULT bit has been tripped. To resume operation the motor must be re-enabled
| None |