]> sigrok.org Git - libsigrok.git/commitdiff
fix broken samplerate calculation
authorBert Vermeulen <redacted>
Sun, 18 Apr 2010 06:07:00 +0000 (23:07 -0700)
committerBert Vermeulen <redacted>
Sun, 18 Apr 2010 06:11:58 +0000 (23:11 -0700)
hardware/saleae-logic/saleae-logic.c

index 336750c41ee3bd8d10b5ae0913bd54cca682d591..891476ec1d0784c56d901a8fe8a5ba9c467b2d54 100644 (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);