Don't test the same rdly twice
authorJean THOMAS <git0@pub.jeanthomas.me>
Mon, 3 Aug 2020 10:57:40 +0000 (12:57 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Mon, 3 Aug 2020 10:57:40 +0000 (12:57 +0200)
libgram/src/calibration.c

index c1721a402e707817f843381378de48e3007c5238..280280288b1743fe6a3dc6180d3150ef4f818613 100644 (file)
@@ -84,7 +84,7 @@ int gram_generate_calibration(const struct gramCtx *ctx, struct gramProfile *pro
        }
 
        // Find maximal rdly
-       for (rdly = min_rdly_p0; rdly < 8; rdly++) {
+       for (rdly = min_rdly_p0+1; rdly < 8; rdly++) {
                profile->rdly_p0 = rdly;
                gram_load_calibration(ctx, profile);
                gram_reset_burstdet(ctx);
@@ -101,7 +101,7 @@ int gram_generate_calibration(const struct gramCtx *ctx, struct gramProfile *pro
                }
        }
 
-       for (rdly = min_rdly_p1; rdly < 8; rdly++) {
+       for (rdly = min_rdly_p1+1; rdly < 8; rdly++) {
                profile->rdly_p1 = rdly;
                gram_load_calibration(ctx, profile);
                gram_reset_burstdet(ctx);