From cb478b7be5384f39f8b8c1dc179fb4b4b635bb1b Mon Sep 17 00:00:00 2001 From: David Banks Date: Tue, 6 Nov 2018 13:15:20 +0000 Subject: [PATCH] Pi Firmware: tidied up logging in autocal Change-Id: I9c8c4f09ae3ea05cd3ba38e25b1ca211bfa8d90b --- src/cpld_normal.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cpld_normal.c b/src/cpld_normal.c index aaa424a6..d644a25d 100644 --- a/src/cpld_normal.c +++ b/src/cpld_normal.c @@ -307,6 +307,7 @@ static void cpld_calibrate(int elk, int chars_per_line) { config->sp_offset[i] = min_i; } log_sp(config); + write_config(config); // If the metric is non zero, there is scope for further optimization in mode7 if (mode7 && min_metric > 0) { @@ -333,23 +334,26 @@ static void cpld_calibrate(int elk, int chars_per_line) { config->sp_offset[i]++; } } + write_config(config); + rgb_metric = diff_N_frames(NUM_CAL_FRAMES, mode7, elk, chars_per_line); + *errors = sum_channels(rgb_metric); + osd_sp(config, 1, *errors); log_sp(config); + log_info("Optimization complete, errors = %d", *errors); } // Determine mode 7 alignment if (mode7 && supports_delay) { - write_config(config); config->full_px_delay = analyze_mode7_alignment(); + write_config(config); } // Perform a final test of errors - write_config(config); rgb_metric = diff_N_frames(NUM_CAL_FRAMES, mode7, elk, chars_per_line); *errors = sum_channels(rgb_metric); osd_sp(config, 1, *errors); - log_info("Calibration complete"); log_sp(config); - log_info("Final errors = %d", *errors); + log_info("Calibration complete, errors = %d", *errors); } static void cpld_set_mode(int mode) {