|
rusEFI
The most advanced open source ECU
|
Brushed or brushless DC motor interface. More...
#include <dc_motor.h>


Public Member Functions | |
| virtual bool | set (float duty)=0 |
| Sets the motor duty cycle. | |
| virtual float | get () const =0 |
| Get the current motor duty cycle. | |
| virtual void | disable (const char *msg)=0 |
| virtual void | enable ()=0 |
| virtual bool | isOpenDirection () const =0 |
| const char * | msg () const |
Protected Attributes | |
| const char * | m_msg = nullptr |
Brushed or brushless DC motor interface.
Represents a DC motor (brushed or brushless) that provides simple torque/power/current/duty cycle control, but not accurate absolute position control.
Definition at line 19 of file dc_motor.h.
|
pure virtual |
Implemented in TwoPinDcMotor.
Referenced by EtbController::setOutput(), and EtbController::update().

|
pure virtual |
Implemented in TwoPinDcMotor.
Referenced by EtbController::setOutput().

|
pure virtual |
Get the current motor duty cycle.
Implemented in TwoPinDcMotor.
|
pure virtual |
Implemented in TwoPinDcMotor.
|
inline |
Definition at line 40 of file dc_motor.h.
Referenced by TwoPinDcMotor::disable(), and DcHardware::msg().

Sets the motor duty cycle.
| duty | +1.0f represents full power forward, and -1.0f represents full power backward. |
Implemented in TwoPinDcMotor.
Referenced by EtbController::setOutput(), and DualHBridgeStepper::update().

|
protected |
Definition at line 45 of file dc_motor.h.
Referenced by TwoPinDcMotor::disable(), TwoPinDcMotor::enable(), and msg().