OttoDIY / OttoNinja

Build your own robot like a Ninja 🐱‍👤 This is the first emotional modular EdTech robot that can walk and roll!
https://www.ottodiy.com/ninja
MIT License
331 stars 214 forks source link

Wrong data type for "O" in oscillator.h #37

Closed TokenTotem closed 2 years ago

TokenTotem commented 4 years ago

At line 30 and 50 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 282). 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 29,30,49,50 in oscillator.h

cparrapa commented 3 years ago

Hi @TokenTotem Thanks now we have a separated oscillator library for ESP