40 std::unique_ptr<std::mutex>
mtx;
43 std::vector<uint8_t> params);
45 std::vector<uint8_t>
query(uint8_t servo_id, uint8_t command);
48 LX16A(std::string serial_port,
unsigned int baud_rate);
52 uint8_t
word(
int low,
int high);
53 int clamp(
int range_min,
int range_max,
int value);
56 void set_servo_id(uint8_t servo_id, uint8_t new_servo_id);
58 void move(uint8_t servo_id,
int position,
int time = 0);
59 void move_prepare(uint8_t servo_id,
int position,
int time = 0);
90 void led_on(uint8_t servo_id);
int get_motor_speed(uint8_t servo_id)
Definition lx16a.cpp:321
std::unique_ptr< Serial > serial
Definition lx16a.hpp:39
std::vector< uint8_t > get_prepared_move(uint8_t servo_id)
Definition lx16a.cpp:205
std::vector< uint8_t > query(uint8_t servo_id, uint8_t command)
Definition lx16a.cpp:152
uint8_t lower_byte(int value)
Definition lx16a.cpp:159
std::unique_ptr< std::mutex > mtx
Definition lx16a.hpp:40
LX16A(std::string serial_port, unsigned int baud_rate)
Definition lx16a.cpp:36
uint8_t get_servo_id(uint8_t servo_id)
Definition lx16a.cpp:167
std::vector< uint8_t > get_position_limits(int8_t servo_id)
Definition lx16a.cpp:226
void set_position_limits(uint8_t servo_id, int min_position, int max_position)
Definition lx16a.cpp:259
void move(uint8_t servo_id, int position, int time=0)
Definition lx16a.cpp:177
void move_prepare(uint8_t servo_id, int position, int time=0)
Definition lx16a.cpp:187
void move_stop(uint8_t servo_id=SERVO_ID_ALL)
Definition lx16a.cpp:201
void set_voltage_limits(uint8_t servo_id, int min_voltage, int max_voltage)
Definition lx16a.cpp:285
int clamp(int range_min, int range_max, int value)
Definition lx16a.cpp:162
uint8_t get_temperature(uint8_t servo_id)
Definition lx16a.cpp:303
uint8_t get_max_temperature_limit(uint8_t servo_id)
Definition lx16a.cpp:297
void set_max_temperature_limit(uint8_t servo_id, int max_temperature)
Definition lx16a.cpp:308
void send_command(uint8_t servo_id, uint8_t command, std::vector< uint8_t > params)
Definition lx16a.cpp:43
uint8_t word(int low, int high)
Definition lx16a.cpp:161
void led_off(uint8_t servo_id)
Definition lx16a.cpp:375
std::vector< uint8_t > wait_for_response(uint8_t servo_id, uint8_t command)
Definition lx16a.cpp:73
void led_on(uint8_t servo_id)
Definition lx16a.cpp:371
void set_motor_mode(uint8_t servo_id, int speed=0)
Definition lx16a.cpp:340
void set_position_offset(uint8_t servo_id, int deviation)
Definition lx16a.cpp:243
void motor_off(uint8_t servo_id)
Definition lx16a.cpp:361
void set_servo_id(uint8_t servo_id, uint8_t new_servo_id)
Definition lx16a.cpp:172
bool is_motor_on(uint8_t servo_id)
Definition lx16a.cpp:351
int get_position_offset(uint8_t servo_id)
Definition lx16a.cpp:214
std::vector< uint8_t > get_voltage_limits(uint8_t servo_id)
Definition lx16a.cpp:272
uint8_t get_led_errors(uint8_t servo_id)
Definition lx16a.cpp:379
uint8_t higher_byte(int value)
Definition lx16a.cpp:160
bool is_led_on(uint8_t servo_id)
Definition lx16a.cpp:366
void save_position_offset(uint8_t servo_id)
Definition lx16a.cpp:255
void move_start(uint8_t servo_id=SERVO_ID_ALL)
Definition lx16a.cpp:197
uint8_t get_voltage(uint8_t servo_id)
Definition lx16a.cpp:279
void set_led_errors(uint8_t servo_id, uint8_t error)
Definition lx16a.cpp:384
int get_position(uint8_t servo_id)
Definition lx16a.cpp:233
uint8_t get_mode(uint8_t servo_id)
Definition lx16a.cpp:315
void set_servo_mode(uint8_t servo_id)
Definition lx16a.cpp:336
void motor_on(uint8_t servo_id)
Definition lx16a.cpp:357
constexpr uint8_t SERVO_ID_ALL
Definition lx16a_consts.hpp:30