OttoDIY / OttoDIYLib

Latest and official Libraries for Arduino Otto DIY robots
http://www..ottodiy.com/
GNU General Public License v3.0
113 stars 73 forks source link

variable "O" is defined as a 'unsigned int' instead of 'int' #7

Closed TokenTotem closed 3 years ago

TokenTotem commented 4 years ago

At line 26 and 46 in oscillator.h, variable "O" is defined as a 'unsigned int' instead of 'int'. "O" have negative value such as when Otto walk (Otto9.cpp line 254). There is no apparent impact on Arduino/Atmega but math results are out of wack on ESP32.

Solution: Change data type from "unsigned int" to "int" for variable "O" and "A" at lines 25,26,45,46 in oscillator.h

cparrapa commented 4 years ago

Hi Thanks! Does this work also for ESP8266?

TokenTotem commented 4 years ago

Hello, I've not tested with ESP8266 but it should work.

cparrapa commented 3 years ago

Hi @TokenTotem @lfrohman @sentamugo7 Can you do a PR please?

Thanks!

sentamugo7 commented 3 years ago

please test this pull request before merge. Thanks.

cparrapa commented 3 years ago

fixed on https://github.com/OttoDIY/OttoDIYLib/pull/19