API Demo
Look at folder to see how the API is generated.
Show function definition from project animals
::: doxy.animal.Function
name: void some_global_function(example::Animal *animal)
function some_global_function
Some random global function that modifies Animal.
void some_global_function (
example::Animal * animal
)
See also: Animal
Parameters:
animal
The pointer to the animal instance
Show class method from project esp
::: doxy.esp.Class.Method
name: rb::MotorChangeBuilder
method: brake (MotorId id, uint16_t brakingPower)
function brake
Start braking.
MotorChangeBuilder & rb::MotorChangeBuilder::brake (
MotorId id,
uint16_t brakingPower
)
Parameters:
id
of the motor (e.g. rb:MotorId::M1)brakingPower
power of the braking, <0, 32767>
Show source code from project stm
::: doxy.stm.Code
file: Motor.hpp
start: 8
end: 20
8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Show class from project stm
::: doxy.esp.Class
name: rb::MotorChangeBuilder
Class rb::MotorChangeBuilder
ClassList > rb > MotorChangeBuilder
Helper class for building the motor change event.
#include <RBCXManager.h>
Public Functions
Type | Name |
---|---|
MotorChangeBuilder () |
|
MotorChangeBuilder (const MotorChangeBuilder & o) = delete |
|
MotorChangeBuilder (MotorChangeBuilder && o) |
|
MotorChangeBuilder & | brake (MotorId id, uint16_t brakingPower) Start braking. |
MotorChangeBuilder & | drive (MotorId id, int32_t positionRelative, int16_t speedTicksPerSecond, Motor::callback_t callback=nullptr) |
MotorChangeBuilder & | driveToValue (MotorId id, int32_t positionAbsolute, int16_t speedTicksPerSecond, Motor::callback_t callback=nullptr) |
MotorChangeBuilder & | power (MotorId id, int16_t value) Set single motor power. |
MotorChangeBuilder & | pwmMaxPercent (MotorId id, int8_t percent) Limit motor index's power to percent. |
void | set () Finish the changes and submit the events. |
MotorChangeBuilder & | speed (MotorId id, int16_t ticksPerSecond) Set single motor power. |
~MotorChangeBuilder () |
Public Functions Documentation
function MotorChangeBuilder [1/3]
rb::MotorChangeBuilder::MotorChangeBuilder ()
function MotorChangeBuilder [2/3]
rb::MotorChangeBuilder::MotorChangeBuilder (
const MotorChangeBuilder & o
) = delete
function MotorChangeBuilder [3/3]
rb::MotorChangeBuilder::MotorChangeBuilder (
MotorChangeBuilder && o
)
function brake
Start braking.
MotorChangeBuilder & rb::MotorChangeBuilder::brake (
MotorId id,
uint16_t brakingPower
)
Parameters:
id
of the motor (e.g. rb:MotorId::M1)brakingPower
power of the braking, <0, 32767>
function drive
MotorChangeBuilder & rb::MotorChangeBuilder::drive (
MotorId id,
int32_t positionRelative,
int16_t speedTicksPerSecond,
Motor::callback_t callback=nullptr
)
function driveToValue
MotorChangeBuilder & rb::MotorChangeBuilder::driveToValue (
MotorId id,
int32_t positionAbsolute,
int16_t speedTicksPerSecond,
Motor::callback_t callback=nullptr
)
function power
Set single motor power.
MotorChangeBuilder & rb::MotorChangeBuilder::power (
MotorId id,
int16_t value
)
Parameters:
id
of the motor (e.g. rb:MotorId::M1)power
of the motor <-32768; 32767>
function pwmMaxPercent
Limit motor index's power to percent.
MotorChangeBuilder & rb::MotorChangeBuilder::pwmMaxPercent (
MotorId id,
int8_t percent
)
Parameters:
id
of the motor (e.g. rb:MotorId::M1)percent
of the maximal power of the motor <0 - 100>
function set
void rb::MotorChangeBuilder::set ()
function speed
Set single motor power.
MotorChangeBuilder & rb::MotorChangeBuilder::speed (
MotorId id,
int16_t ticksPerSecond
)
Parameters:
id
of the motor (e.g. rb:MotorId::M1)speed
of the motor in encoder ticks <-32768; 32767>
function ~MotorChangeBuilder
rb::MotorChangeBuilder::~MotorChangeBuilder ()
The documentation for this class was generated from the following file demo-projets/esp/RBCXManager.h