RBCX
Library for the RB3204-RBCX board with the ESP32 by RoboticsBrno.
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
rb Namespace Reference

Classes

class  Angle
 
class  Battery
 Contains the battery state and can control the robot's power. More...
 
class  Buttons
 
class  Leds
 
class  Manager
 The main library class for working with the RBCX board. Call the install() method at the start of your program. More...
 
class  Motor
 
class  MotorChangeBuilder
 Helper class for building the motor change event. More...
 
class  Mpu
 Helper class for controlling the Mpu. More...
 
struct  MpuMotion6
 
struct  MpuMotion9
 
struct  MpuVector
 
class  Nvs
 
class  Oled
 Helper class for controlling the Oled. More...
 
class  Piezo
 Helper class for controlling the piezo. More...
 
class  SmartServoBusBackend
 
class  StupidServo
 
class  Timers
 
class  Ultrasound
 

Enumerations

enum  ButtonId : uint32_t {
  Off = CoprocStat_ButtonsEnum_BOFF , On = CoprocStat_ButtonsEnum_BON , B1 = CoprocStat_ButtonsEnum_B1 , B2 = CoprocStat_ButtonsEnum_B2 ,
  B3 = CoprocStat_ButtonsEnum_B3 , B4 = CoprocStat_ButtonsEnum_B4 , Up = B1 , Down = B2 ,
  Left = B3 , Right = B4
}
 Helper class for controlling the LEDs connected to the expander. More...
 
enum  LedId {
  L1 = CoprocReq_LedsEnum_L1 , L2 = CoprocReq_LedsEnum_L2 , L3 = CoprocReq_LedsEnum_L3 , L4 = CoprocReq_LedsEnum_L4 ,
  Green = L1 , Yellow = L2 , Red = L3 , Blue = L4 ,
  All = L1 | L2 | L3 | L4
}
 Helper class for controlling the LEDs connected to the expander. More...
 
enum  ManagerInstallFlags { MAN_NONE = 0 , MAN_DISABLE_MOTOR_FAILSAFE = (1 << 0) , MAN_DISABLE_ESP_WATCHDOG = (1 << 1) }
 This enum contains flags for the Manager's install() method. More...
 
enum class  MotorId : uint8_t {
  M1 , M2 , M3 , M4 ,
  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)
 
ManagerInstallFlags operator| (ManagerInstallFlags a, ManagerInstallFlags b)
 
MotorId operator++ (MotorId &x)
 Decrements the motor ID. More...
 
MotorId operator-- (MotorId &x)
 
static void dieTimers (TimerHandle_t timer)
 
template<typename T >
clamp (T value, T min, T max)
 
void delayMs (int ms)
 Delay for given number of milliseconds. Like Arduino's delay() More...
 
void delay (std::chrono::duration< uint32_t, std::milli > delay)
 Delay for given number of microseconds. Like Arduino's delayMicroseconds() More...
 

Variables

static constexpr int UltrasoundsCount = 4
 
static constexpr int StupidServosCount = 4
 

Enumeration Type Documentation

◆ ButtonId

enum rb::ButtonId : uint32_t

Helper class for controlling the LEDs connected to the expander.

Enumerator
Off 
On 
B1 
B2 
B3 
B4 
Up 
Down 
Left 
Right 

◆ LedId

enum rb::LedId

Helper class for controlling the LEDs connected to the expander.

Enumerator
L1 
L2 
L3 
L4 
Green 
Yellow 
Red 
Blue 
All 

◆ ManagerInstallFlags

This enum contains flags for the Manager's install() method.

Enumerator
MAN_NONE 

Disables automatic motor failsafe, which stops the motors after 300ms of no set motor power calls.

MAN_DISABLE_MOTOR_FAILSAFE 

Disables the watchdog on STM32 coprocessor, which resets the ESP32 and stops all peripherials if ESP32 does not respond in time. The watchdog is disabled by default, but this library enables it on start (unless this flag is used) and it stays on through ESP32 restarts.

MAN_DISABLE_ESP_WATCHDOG 

◆ MotorId

enum class rb::MotorId : uint8_t
strong
Enumerator
M1 

Motor 1.

M2 

Motor 2.

M3 

Motor 3.

M4 

Motor 4.

MAX 

Maximal motor ID.

Function Documentation

◆ clamp()

template<typename T >
T rb::clamp ( value,
min,
max 
)

◆ delay()

void rb::delay ( std::chrono::duration< uint32_t, std::milli >  delay)
inline

Delay for given number of microseconds. Like Arduino's delayMicroseconds()

Parameters
us

◆ delayMs()

void rb::delayMs ( int  ms)
inline

Delay for given number of milliseconds. Like Arduino's delay()

Parameters
ms

◆ dieTimers()

static void rb::dieTimers ( TimerHandle_t  timer)
static

◆ operator""_deg() [1/2]

Angle rb::operator""_deg ( long double  d)

◆ operator""_deg() [2/2]

Angle rb::operator""_deg ( unsigned long long int  d)

◆ operator""_rad() [1/2]

Angle rb::operator""_rad ( long double  r)

◆ operator""_rad() [2/2]

Angle rb::operator""_rad ( unsigned long long int  r)

◆ operator*()

Angle rb::operator* ( Angle  a,
Angle::_T  c 
)

◆ operator+()

Angle rb::operator+ ( Angle  a,
Angle  b 
)

◆ operator++()

MotorId rb::operator++ ( MotorId x)
inline

Decrements the motor ID.

◆ operator-()

Angle rb::operator- ( Angle  a,
Angle  b 
)

◆ operator--()

MotorId rb::operator-- ( MotorId x)
inline

◆ operator/()

Angle rb::operator/ ( Angle  a,
Angle::_T  c 
)

◆ operator|()

ManagerInstallFlags rb::operator| ( ManagerInstallFlags  a,
ManagerInstallFlags  b 
)
inline

Variable Documentation

◆ StupidServosCount

constexpr int rb::StupidServosCount = 4
staticconstexpr

◆ UltrasoundsCount

constexpr int rb::UltrasoundsCount = 4
staticconstexpr