From cfbcf5df46fb64dc16b8a9ece8e1758acb040cff Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 4 May 2013 20:40:22 +0200 Subject: [PATCH] Fix sync pulse reference length. --- decode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/decode.cpp b/decode.cpp index e3ec677..20c748e 100644 --- a/decode.cpp +++ b/decode.cpp @@ -15,7 +15,7 @@ #define SYNC_PULSE_START 1000 #define SYNC_PULSE_END 15000 -#define SYNC_PULSE_LENGTH 380.0 +#define SYNC_PULSE_LENGTH 378.0 #define SYNC_TEST_TOLERANCE 1.10 struct tap_header { @@ -174,8 +174,8 @@ int main(int argc, char **argv) } double mean_length = C64_FREQUENCY * sum / (SYNC_PULSE_END - SYNC_PULSE_START); calibration_factor = SYNC_PULSE_LENGTH / mean_length; - fprintf(stderr, "Calibrated sync pulse length: %.2f -> 380.0 (change %+.2f%%)\n", - mean_length, 100.0 * (calibration_factor - 1.0)); + fprintf(stderr, "Calibrated sync pulse length: %.2f -> %.2f (change %+.2f%%)\n", + mean_length, SYNC_PULSE_LENGTH, 100.0 * (calibration_factor - 1.0)); // Check for pulses outside +/- 10% (sign of misdetection). for (int i = SYNC_PULSE_START; i < SYNC_PULSE_END; ++i) { -- 2.39.2