Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/rov/rov_pca9685/src/ServoDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,6 @@ void ServoDriver::setThrottle(uint8_t channel, float throttle) {
driver_board.setUS(channel, f2imap(throttle, -1.0, 1.0, s->us_minimum, s->us_maximum));
}

void ServoDriver::setDuty(uint8_t channel, float duty) {
driver_board.setDuty(channel, duty);
}

void ServoDriver::setUS(uint8_t channel, uint16_t us) {
driver_board.setUS(channel, us);
}

void ServoDriver::setThrottle(uint8_t channel, float throttle) {
if (!continuous_servos.count(channel)) {
RCLCPP_WARN(rclcpp::get_logger("ServoDriver"), "Attempted to set throttle on non-continuous servo");
return;
}
ContinuousServo* s = &continuous_servos[channel];
driver_board.setUS(channel, f2imap(throttle, -1.0, 1.0, s->us_minimum, s->us_maximum));
}

void ServoDriver::setAngle(uint8_t channel, float angle) {
if (!servos.count(channel)) {
RCLCPP_WARN(rclcpp::get_logger("ServoDriver"), "Attempted to set angle on continuous servo");
Expand Down
Loading