This commit is contained in:
bap
2024-04-17 18:52:45 +02:00
parent 6fd8d684f2
commit c1665755f6

View File

@@ -56,8 +56,8 @@ void MyTCPClient::handleMessage(const std::string &message) {
return;
}
int servo = std::stoi(args[0]);
double angle = std::stof(args[1]);
this->pwm_setServoPosition(servo, angle);
int angleDeg = static_cast<int>(std::stof(args[1]));
this->pwm_setServoPosition(servo, angleDeg);
} else if (token[2] == "clear") {
this->pwm_clear();
}