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
when compiling and flashing this library as-is, my teensy 4.1 would crash, at least I would fail to get any serial logs out of the device... after debugging, I found the fmod function is for doubles, but fmodf is for floats. Thus these changes are suggested:
void AD9833 :: SetPhase ( Registers phaseReg, float phaseInDeg ) {
// Sanity checks on input
- phaseInDeg = fmod(phaseInDeg,360);
- if ( phaseInDeg < 0 ) phaseInDeg += 360;
+ // fmod crashes the teensy, fmodf does not
+ phaseInDeg = fmodf(phaseInDeg, 360.);
+ if ( phaseInDeg < 0 ) phaseInDeg += 360.;
The text was updated successfully, but these errors were encountered:
when compiling and flashing this library as-is, my
teensy 4.1
would crash, at least I would fail to get any serial logs out of the device... after debugging, I found thefmod
function is for doubles, butfmodf
is for floats. Thus these changes are suggested:The text was updated successfully, but these errors were encountered: