Minor fixes

This commit is contained in:
Oleg Kalachev 2024-12-25 01:41:45 +03:00
parent fd30027ea4
commit 2efae82177
3 changed files with 3 additions and 5 deletions

View File

@ -26,8 +26,8 @@ void setupMotors() {
Serial.println("Motors initialized");
}
uint8_t signalToDutyCycle(float control) {
float duty = mapff(control, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
uint8_t signalToDutyCycle(float signal) {
float duty = mapff(signal, 0, 1, 0, (1 << PWM_RESOLUTION) - 1);
return round(constrain(duty, 0, (1 << PWM_RESOLUTION) - 1));
}

View File

@ -111,7 +111,7 @@ public:
class HardwareSerial: public Print {
public:
void begin(unsigned long baud) {
// server is running in background by default, so doesn't have access to stdin
// server is running in background by default, so it doesn't have access to stdin
// https://github.com/gazebosim/gazebo-classic/blob/d45feeb51f773e63960616880b0544770b8d1ad7/gazebo/gazebo_main.cc#L216
// set foreground process group to current process group to allow reading from stdin
// https://stackoverflow.com/questions/58918188/why-is-stdin-not-propagated-to-child-process-of-different-process-group

View File

@ -36,8 +36,6 @@ public:
return true;
}
void end();
bool isKey(const char *key) {
return storage.find(key) != storage.end();
}