From fbcefa3e72095b61a5cfdfb9fd07057d10eb0c5c Mon Sep 17 00:00:00 2001 From: roncarr880 Date: Wed, 19 Aug 2020 14:34:12 -0400 Subject: [PATCH] Add files via upload --- QRP_LABS_WSPR.ino | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/QRP_LABS_WSPR.ino b/QRP_LABS_WSPR.ino index abd47f0..64aa3d1 100644 --- a/QRP_LABS_WSPR.ino +++ b/QRP_LABS_WSPR.ino @@ -1219,6 +1219,7 @@ int cnt; loops = last_time_error/100; // loop 1,2,3,4,5 times for error <100, <200, <300, <400, <500 if( loops < 0 ) loops = -loops; ++loops; + if( err < CLK_UPDATE_THRESHOLD2 ) ++loops; // to process both the single and multi time adjustments if( last_error_count < CLK_UPDATE_THRESHOLD2 ) ++last_error_count; // relax the test threshold @@ -1227,7 +1228,7 @@ int cnt; t = 0; // signal better than the relaxing threshold ? - if( err < last_error_count ){ + if( err < last_error_count ){ // looped time adjustment t = ( tm < 500 ) ? -1 : 1 ; if( tm == 0 ) t = 0; @@ -1238,6 +1239,12 @@ int cnt; last_error_count = err; // new threshold val_print = '*'; } + else if( err < CLK_UPDATE_THRESHOLD2 ){ // single time adjustment when locked out by last_error_count + t = ( tm < 500 ) ? -1 : 1 ; + if( tm == 0 ) t = 0; + if( t == 1 ) val_print = '>'; + if( t == -1 ) val_print = '<'; + } if( t == 0 ){ // use old data for the correction amount if( last_time_error > 0 ) last_time_error--, t = -1;