We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The pio_calculate_clkdiv_from_float() function is truncating the fractional result:
pio_calculate_clkdiv_from_float()
*div_frac = (uint8_t)((div - (float)*div_int) * (1u << 8u));
It should be rounding. One way to do this is to add half of 1/256 up front, as the very first line of the function, before the range check:
// Bump div by 1/512 so that we're rounding instead of truncating. div += 0.001953125f;
This error caused an NTSC color burst to be far enough off in frequency to not be recognized by two different monitors.
The text was updated successfully, but these errors were encountered:
kilograham
No branches or pull requests
The
pio_calculate_clkdiv_from_float()
function is truncating the fractional result:It should be rounding. One way to do this is to add half of 1/256 up front, as the very first line of the function, before the range check:
This error caused an NTSC color burst to be far enough off in frequency to not be recognized by two different monitors.
The text was updated successfully, but these errors were encountered: