ros-mobile-robots / diffbot

DiffBot is an autonomous 2wd differential drive robot using ROS Noetic on a Raspberry Pi 4 B. With its SLAMTEC Lidar and the ROS Control hardware interface it's capable of navigating in an environment using the ROS Navigation stack and making use of SLAM algorithms to create maps of unknown environments.
https://ros-mobile-robots.com
BSD 3-Clause "New" or "Revised" License
297 stars 86 forks source link

Fix base_config PWM_MIN macro #72

Closed 0xraks closed 1 year ago

0xraks commented 1 year ago

Hi @fjp , Minor bug due to missed parenthesis. The expected PWM_MIN value is -255, due to the missing parenthesis, the value becomes -257 #define PWM_MIN -pow(2, PWM_BITS) -1

After adding parenthesis: #define PWM_MIN -(pow(2, PWM_BITS) -1)

Thx :)