6 #include <driver/gpio.h>
7 #include <driver/pcnt.h>
25 void set(uint8_t
id,
Angle ang,
float speed = 180.f,
float speed_raise = 0.0015f);
33 void setId(uint8_t newId, uint8_t destId = 254);
34 uint8_t
getId(uint8_t destId = 254);
39 void install(uint8_t servo_count, uart_port_t uart, gpio_num_t pin);
41 static void regulatorRoutineTrampoline(
void* cookie);
42 void regulatorRoutine();
43 bool regulateServo(QueueHandle_t responseQueue,
size_t id, uint32_t timeSliceMs);
45 static void uartRoutineTrampoline(
void* cookie);
47 size_t uartReceive(uint8_t* buff,
size_t bufcap);
57 auto_stop_counter = 0;
60 bool hasValidCurrent()
const {
61 return current != 0xFFFF;
70 uint8_t auto_stop_counter;
77 QueueHandle_t responseQueue;
86 QueueHandle_t responseQueue = NULL,
bool expect_response =
false,
bool to_front =
false);
87 void sendAndReceive(
const lw::Packet& pkt, SmartServoBus::rx_response& res,
bool to_front =
false);
89 std::vector<servo_info> m_servos;
92 QueueHandle_t m_uart_queue;
94 gpio_num_t m_uart_pin;
Definition: RBControl_angle.hpp:11
The main library class for working with the RBControl board. Call the install() method at the start o...
Definition: RBControl_manager.hpp:49
Definition: RBControl_servo.hpp:18
void setAutoStop(uint8_t id, bool enable=true)
Definition: RBControl_servo.cpp:141
uint8_t getId(uint8_t destId=254)
Definition: RBControl_servo.cpp:68
~SmartServoBus()
Definition: RBControl_servo.hpp:23
Angle posOffline(uint8_t id)
Definition: RBControl_servo.cpp:128
void setId(uint8_t newId, uint8_t destId=254)
Definition: RBControl_servo.cpp:63
Angle pos(uint8_t id)
Definition: RBControl_servo.cpp:106
void limit(uint8_t id, Angle bottom, Angle top)
Definition: RBControl_servo.cpp:136
void set(uint8_t id, Angle ang, float speed=180.f, float speed_raise=0.0015f)
Definition: RBControl_servo.cpp:76
SmartServoBus()
Definition: RBControl_servo.cpp:17
The base namespace. Contains some logging functions, too.
Definition: half_duplex_uart.cpp:53