From ce67baae89a6e51e0319fb3b1874e0e9dbc7cdc5 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 25 Dec 2024 02:18:52 +0300 Subject: [PATCH] Minor fixes --- flix/motors.ino | 4 ++-- gazebo/Arduino.h | 2 +- 2 files changed, 3 insertions(+), 3 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 48b56de..55f021c 100644 --- a/gazebo/Arduino.h +++ b/gazebo/Arduino.h @@ -99,7 +99,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