405 Documentation  9.0
motorDriver.MotorBase Class Reference

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
 

Detailed Description

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

Date
Mar. 9, 2021

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
nFault_pinfault detection pin [IN]
motor1DC motor 1
motor2DC motor 2

Member Function Documentation

◆ enableMotors()

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.

Parameters
None

◆ faultISR()

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

Parameters
None

◆ UnFaultISR()

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

Parameters
None

The documentation for this class was generated from the following file: