15 class MotorChangeBuilder;
26 void power(int8_t value);
52 void drive(int32_t positionRelative, uint8_t
power, std::function<
void(
Encoder&)> callback =
nullptr);
68 bool direct_power(int8_t
power);
69 bool direct_pwmMaxPercent(int8_t percent);
70 bool direct_stop(int8_t);
79 std::unique_ptr<Encoder> m_encoder;
82 int8_t m_pwm_max_percent;
Definition: RBControl_encoder.hpp:17
The main library class for working with the RBControl board. Call the install() method at the start o...
Definition: RBControl_manager.hpp:49
Helper class for building the motor change event.
Definition: RBControl_manager.hpp:183
Definition: RBControl_motor.hpp:17
int8_t pwmMaxPercent() const
Get current maximum PWM percent value.
Definition: RBControl_motor.hpp:38
void power(int8_t value)
Set motor power.
Definition: RBControl_motor.cpp:71
void drive(int32_t positionRelative, uint8_t power, std::function< void(Encoder &)> callback=nullptr)
Drive motor to set position (according relative value). See Encoder::drive.
Definition: RBControl_motor.cpp:83
Encoder * enc()
Get the Encoder instance for this motor. Same as encoder.
Definition: RBControl_motor.hpp:62
void stop()
Stop motor.
Definition: RBControl_motor.cpp:67
Encoder * encoder()
Get the Encoder instance for this motor. See Encoder.
Definition: RBControl_motor.cpp:87
void driveToValue(int32_t positionAbsolute, uint8_t power, std::function< void(Encoder &)> callback=nullptr)
Drive motor to set position (according absolute value). See Encoder::driveToValue.
Definition: RBControl_motor.cpp:79
int value_type
Definition: RBControl_serialPWM.hpp:15
The base namespace. Contains some logging functions, too.
Definition: half_duplex_uart.cpp:53
MotorId
Definition: RBControl_pinout.hpp:8