fix broken samplerate calculation

This commit is contained in:
Bert Vermeulen 2010-04-17 23:07:00 -07:00
parent 9c48090a88
commit eee4890f2f
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ static int set_configuration_samplerate(struct sigrok_device_instance *sdi,
if (supported_samplerates[i] == 0)
return SIGROK_ERR_SAMPLERATE;
divider = (uint8_t) (48 / (float)(samplerate / 1000000)) - 1;
divider = (uint8_t) (48 / (samplerate / 1000000.0)) - 1;
g_message("setting samplerate to %" PRIu64 " Hz (divider %d)",
samplerate, divider);