RBControl
Library for the RB3201-RBControl board with the ESP32 by RoboticsBrno.
|
The base namespace. Contains some logging functions, too. More...
Namespaces | |
half_duplex | |
Classes | |
class | Angle |
class | Arm |
class | Bone |
class | BoneBuilder |
class | ArmBuilder |
class | Battery |
Contains the battery state and can control the robot's power. More... | |
class | Encoder |
class | Leds |
Helper class for controlling the LEDs connected to the expander. More... | |
class | Manager |
The main library class for working with the RBControl board. Call the install() method at the start of your program. More... | |
class | MotorChangeBuilder |
Helper class for building the motor change event. More... | |
class | Motor |
class | Nvs |
class | Piezo |
Helper class for controlling the piezo. More... | |
class | SerialPWM |
class | SmartServoBus |
class | Timers |
Enumerations | |
enum | ManagerInstallFlags { MAN_NONE = 0 , MAN_DISABLE_MOTOR_FAILSAFE = (1 << 0) , MAN_DISABLE_BATTERY_MANAGEMENT = (1 << 1) , MAN_DISABLE_PIEZO = (1 << 2) } |
This enum contains flags for the Manager's install() method. More... | |
enum class | MotorId : uint8_t { M1 , M2 , M3 , M4 , M5 , M6 , M7 , M8 , MAX } |
Functions | |
Angle | operator+ (Angle a, Angle b) |
Angle | operator- (Angle a, Angle b) |
Angle | operator* (Angle a, Angle::_T c) |
Angle | operator/ (Angle a, Angle::_T c) |
Angle | operator""_deg (long double d) |
Angle | operator""_rad (long double r) |
Angle | operator""_deg (unsigned long long int d) |
Angle | operator""_rad (unsigned long long int r) |
__attribute__ ((constructor)) void loggerInit() | |
template<typename... Args> | |
FormatString | log (int verbosity, const std::string &tag, const std::string &message, Args... args) |
template<typename... Args> | |
FormatString | logPanic (const std::string &tag, const std::string &message, Args... args) |
template<typename... Args> | |
FormatString | logError (const std::string &tag, const std::string &message, Args... args) |
template<typename... Args> | |
FormatString | logWarning (const std::string &tag, const std::string &message, Args... args) |
template<typename... Args> | |
FormatString | logInfo (const std::string &tag, const std::string &message, Args... args) |
template<typename... Args> | |
FormatString | logDebug (const std::string &tag, const std::string &message, Args... args) |
ManagerInstallFlags | operator| (ManagerInstallFlags a, ManagerInstallFlags b) |
static int | INV (int v) |
MotorId | operator++ (MotorId &x) |
static void | dieTimers (TimerHandle_t timer) |
template<typename T , typename... Args> | |
T | clamp (T value, T min, T max, const char *tag="", const char *msg=NULL, Args... args) |
void | delayMs (int ms) |
void | delay (std::chrono::duration< uint32_t, std::milli > delay) |
Variables | |
const int | DEFAULT_REF_VOLTAGE = 1100 |
const int | BATTERY_ADC_SAMPLES = 32 |
static const pcnt_unit_t | PCNT_UNITS [ENC_COUNT] |
const gpio_num_t | ENCODER_PINS [ENC_COUNT *2] |
Logger | logger |
static const gpio_num_t | IO0 = GPIO_NUM_0 |
static const gpio_num_t | IO2 = GPIO_NUM_2 |
static const gpio_num_t | IO12 = GPIO_NUM_12 |
static const gpio_num_t | IO4 = GPIO_NUM_4 |
static const gpio_num_t | IO5 = GPIO_NUM_5 |
static const gpio_num_t | IO13 = GPIO_NUM_13 |
static const gpio_num_t | IO14 = GPIO_NUM_14 |
static const gpio_num_t | IO15 = GPIO_NUM_15 |
static const gpio_num_t | IO16 = GPIO_NUM_16 |
static const gpio_num_t | IO17 = GPIO_NUM_17 |
static const gpio_num_t | IO18 = GPIO_NUM_18 |
static const gpio_num_t | IO19 = GPIO_NUM_19 |
static const gpio_num_t | IO21 = GPIO_NUM_21 |
static const gpio_num_t | IO25 = GPIO_NUM_25 |
static const gpio_num_t | IO26 = GPIO_NUM_26 |
static const gpio_num_t | IO27 = GPIO_NUM_27 |
static const gpio_num_t | IO32 = GPIO_NUM_32 |
static const gpio_num_t | IO33 = GPIO_NUM_33 |
static const gpio_num_t | IO34 = GPIO_NUM_34 |
static const gpio_num_t | IO35 = GPIO_NUM_35 |
static const gpio_num_t | RCKMOT = IO0 |
static const gpio_num_t | SERMOT = IO2 |
static const gpio_num_t | SCKMOT = IO12 |
static const gpio_num_t | ENC1A = IO21 |
static const gpio_num_t | ENC1B = IO19 |
static const gpio_num_t | ENC2A = IO18 |
static const gpio_num_t | ENC2B = IO5 |
static const gpio_num_t | ENC3A = IO17 |
static const gpio_num_t | ENC3B = IO16 |
static const gpio_num_t | ENC4A = IO15 |
static const gpio_num_t | ENC4B = IO13 |
static const gpio_num_t | ENC5A = IO4 |
static const gpio_num_t | ENC5B = IO15 |
static const gpio_num_t | ENC6A = IO27 |
static const gpio_num_t | ENC6B = IO26 |
static const gpio_num_t | ENC7A = IO25 |
static const gpio_num_t | ENC7B = IO33 |
static const gpio_num_t | ENC8A = IO32 |
static const gpio_num_t | ENC8B = IO35 |
static const gpio_num_t | POWER_OFF = IO32 |
static const gpio_num_t | BATT_REF = IO34 |
static const adc_unit_t | BATT_ADC_UNIT = ADC_UNIT_1 |
static const adc1_channel_t | BATT_ADC_CHANNEL = ADC1_CHANNEL_6 |
static const gpio_num_t | PIEZO_A = ENC7A |
static const gpio_num_t | PIEZO_B = ENC7B |
static const gpio_num_t | I2C_MASTER_SDA = GPIO_NUM_23 |
static const gpio_num_t | I2C_MASTER_SCL = GPIO_NUM_22 |
static const int | I2C_ADDR_EXPANDER = 0x20 | 0x01 |
static const int | EA0 = 0 |
static const int | EA1 = 1 |
static const int | EA2 = 2 |
static const int | EA3 = 3 |
static const int | EA4 = 4 |
static const int | EA5 = 5 |
static const int | EA6 = 6 |
static const int | EA7 = 7 |
static const int | EB0 = 8 |
static const int | EB1 = 9 |
static const int | EB2 = 10 |
static const int | EB3 = 11 |
static const int | EB4 = 12 |
static const int | EB5 = 13 |
static const int | EB6 = 14 |
static const int | EB7 = 15 |
static const int | SW1 = EB0 |
static const int | SW2 = EB1 |
static const int | SW3 = EB2 |
static const int | LED_RED = EB3 |
static const int | LED_YELLOW = EB4 |
static const int | LED_GREEN = EB5 |
static const int | LED_BLUE = EB6 |
static const int | EXPANDER_BOARD_POWER_ON = EB7 |
The base namespace. Contains some logging functions, too.
This enum contains flags for the Manager's install() method.
|
strong |
rb::__attribute__ | ( | (constructor) | ) |
T rb::clamp | ( | T | value, |
T | min, | ||
T | max, | ||
const char * | tag = "" , |
||
const char * | msg = NULL , |
||
Args... | args | ||
) |
|
inline |
|
inline |
|
static |
|
static |
FormatString rb::log | ( | int | verbosity, |
const std::string & | tag, | ||
const std::string & | message, | ||
Args... | args | ||
) |
FormatString rb::logDebug | ( | const std::string & | tag, |
const std::string & | message, | ||
Args... | args | ||
) |
FormatString rb::logError | ( | const std::string & | tag, |
const std::string & | message, | ||
Args... | args | ||
) |
FormatString rb::logInfo | ( | const std::string & | tag, |
const std::string & | message, | ||
Args... | args | ||
) |
FormatString rb::logPanic | ( | const std::string & | tag, |
const std::string & | message, | ||
Args... | args | ||
) |
FormatString rb::logWarning | ( | const std::string & | tag, |
const std::string & | message, | ||
Args... | args | ||
) |
Angle rb::operator""_deg | ( | long double | d | ) |
Angle rb::operator""_deg | ( | unsigned long long int | d | ) |
Angle rb::operator""_rad | ( | long double | r | ) |
Angle rb::operator""_rad | ( | unsigned long long int | r | ) |
|
inline |
|
static |
|
static |
|
static |
const int rb::BATTERY_ADC_SAMPLES = 32 |
const int rb::DEFAULT_REF_VOLTAGE = 1100 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const gpio_num_t rb::ENCODER_PINS[ENC_COUNT *2] |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Logger rb::logger |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |