From 2efae8217791402aa6c1a1ba81ccb61b5eadb1d3 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 25 Dec 2024 01:41:45 +0300 Subject: [PATCH] Minor fixes --- flix/motors.ino | 4 ++-- gazebo/Arduino.h | 2 +- gazebo/Preferences.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flix/motors.ino b/flix/motors.ino index 0c17cd1..5b25f3f 100644 --- a/flix/motors.ino +++ b/flix/motors.ino @@ -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)); } diff --git a/gazebo/Arduino.h b/gazebo/Arduino.h index 86b9870..d305865 100644 --- a/gazebo/Arduino.h +++ b/gazebo/Arduino.h @@ -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 diff --git a/gazebo/Preferences.h b/gazebo/Preferences.h index 30cb75d..73bf589 100644 --- a/gazebo/Preferences.h +++ b/gazebo/Preferences.h @@ -36,8 +36,6 @@ public: return true; } - void end(); - bool isKey(const char *key) { return storage.find(key) != storage.end(); }