#include <adiMotor.hpp>
Definition at line 13 of file adiMotor.hpp.
◆ ADIMotor() [1/2]
A motor in an ADI port.
- Parameters
-
| iport | The ADI port number ([1, 8], [a, h], [A, H]). |
| ireverse | Whether the motor is reversed. |
| logger | The logger that initialization warnings will be logged to. |
◆ ADIMotor() [2/2]
| okapi::ADIMotor::ADIMotor |
( |
std::pair< std::uint8_t, std::uint8_t > |
iports, |
|
|
bool |
ireverse = false, |
|
|
const std::shared_ptr< Logger > & |
logger = Logger::getDefaultLogger() |
|
) |
| |
A motor in an ADI port.
auto reversedMtr =
ADIMotor({1,
'A'},
true);
- Parameters
-
| iports | The ports the motor is plugged in to in the order {smart port, motor port}. The smart port is the smart port number ([1, 21]). The motor port is the ADI port number ([1, 8], [a, h], [A, H]). |
| ireverse | Whether the motor is reversed. |
| logger | The logger that initialization warnings will be logged to. |
◆ controllerSet()
| void okapi::ADIMotor::controllerSet |
( |
double |
ivalue | ) |
|
|
overridevirtual |
Writes the value of the controller output.
This method might be automatically called in another thread by the controller. The range of input values is expected to be [-1, 1].
- Parameters
-
| ivalue | the controller's output in the range [-1, 1] |
Implements okapi::ControllerOutput< double >.
◆ moveVoltage()
| virtual void okapi::ADIMotor::moveVoltage |
( |
std::int8_t |
ivoltage | ) |
const |
|
virtual |
Set the voltage to the motor.
- Parameters
-
| ivoltage | voltage in the range [-127, 127]. |
◆ port
| std::uint8_t okapi::ADIMotor::port |
|
protected |
◆ reversed
| std::int8_t okapi::ADIMotor::reversed |
|
protected |
◆ smartPort
| std::uint8_t okapi::ADIMotor::smartPort |
|
protected |
The documentation for this class was generated from the following file: