You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidsetup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("\r\n");
}
voidloop() {
// put your main code here, to run repeatedly:float f = -459.00;
float t = -38.00;
int i = digitalRead(13);
t += i * 10.0; //if comment out this line, it works!
Serial.println(atan2f(t, f));
delay(1000);
}
The weird thing is, if comment out t+=i*10.0 , it works. Actually, the code above is simplified from my project. In my project, I propagated the operation variable of atan2f from the reading of I2C device.
So the sign is, if the variable for atan2f is polluted by hardware output, atan2f will cause reset.
Another info, if call ets_memcpy/os_memcpy before atan2f, will also make atan2f call cause reboot.
Why? Another bug of cross-toolchain?
The text was updated successfully, but these errors were encountered:
on Windows, libm.a was not built with math functions enabled. I have uploaded an updated toolchain but haven't changed the .json files yet. Use libm.a from linux or mac toolchain if you happen to be on windows.
The following code:
The weird thing is, if comment out t+=i*10.0 , it works. Actually, the code above is simplified from my project. In my project, I propagated the operation variable of atan2f from the reading of I2C device.
So the sign is, if the variable for atan2f is polluted by hardware output, atan2f will cause reset.
Another info, if call ets_memcpy/os_memcpy before atan2f, will also make atan2f call cause reboot.
Why? Another bug of cross-toolchain?
The text was updated successfully, but these errors were encountered: