Closed codydg closed 5 years ago
just to check, what board/platform is this you're using?
just verified on a circuit Playground express setting throttle to 0.5 does the right thing
I have the Feather HUZZAH w/ ESP8266 on a Crickit, and I'm compiling using PlatformIO in Visual Studio Code.
I've attached an example file which, when I run it, only drives the motor when throttle is +- 1.0, but if I change abs to fabs, it works as intended.
ahh this is probably an espressif thing
thanks!
fabs inputs and outputs doubles (as opposed to abs which uses integers, and fabsf which uses floats). abs(value) takes all values below 100% power and rounds them down to 0% power.