Date: Thu, 23 Dec 2021 19:58:53 GMT From: Diane Bruce <db@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 836192413bfb - main - comms/linrad: Really unbreak linrad on current Message-ID: <202112231958.1BNJwrZY004262@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by db: URL: https://cgit.FreeBSD.org/ports/commit/?id=836192413bfbe04c26e05e23fe3118bbb36d0cfc commit 836192413bfbe04c26e05e23fe3118bbb36d0cfc Author: Diane Bruce <db@FreeBSD.org> AuthorDate: 2021-12-23 19:46:45 +0000 Commit: Diane Bruce <db@FreeBSD.org> CommitDate: 2021-12-23 19:46:45 +0000 comms/linrad: Really unbreak linrad on current - I forgot to add the patch files somehow --- comms/linrad/files/patch-afc__graph.c | 31 +++++++++++++++ comms/linrad/files/patch-cwdetect.c | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/comms/linrad/files/patch-afc__graph.c b/comms/linrad/files/patch-afc__graph.c new file mode 100644 index 000000000000..57dc3c4da5b1 --- /dev/null +++ b/comms/linrad/files/patch-afc__graph.c @@ -0,0 +1,31 @@ +--- afc_graph.c.orig 2014-11-04 10:25:00 UTC ++++ afc_graph.c +@@ -71,7 +71,9 @@ void make_afc_graph(int clear_old); + int afc_fit_line(void) + { + int i,j,k, np; +-float t1, t2, wfq, ston_avgsumsq, r1, r2; ++float t1, t2, wfq, ston_avgsumsq; ++float r1; ++ + // Make an S/N weighted least squares fit of a straight line + // to mix1_eval_fq from fftx_nf1 to fftx_nf2. + // First store weights ( S/N ) in afc_spectrum which can +@@ -174,7 +176,7 @@ if(llsq1() != 0) + // Also calculate under assumption we adopted the average frequency wfq. + t1=0; + t2=0; +-r2=0; ++//r2=0; + np=fftx_nf1; + afc_slope=llsq_steps[1]; + for(i=0; i<ag.fit_points; i++) +@@ -185,7 +187,7 @@ for(i=0; i<ag.fit_points; i++) + mix1_fitted_fq[mix1p0+np]=r1; + t1+=(float)pow((r1-mix1_eval_fq[mix1p0+np]),2.0)*afc_spectrum[i]; + t2+=(float)pow((wfq-mix1_eval_fq[mix1p0+np]),2.0)*afc_spectrum[i]; +- r2+=(float)pow((mix1_good_freq[ag_ss]-mix1_eval_fq[mix1p0+np]),2.0)*afc_spectrum[i]; ++ // r2+=(float)pow((mix1_good_freq[ag_ss]-mix1_eval_fq[mix1p0+np]),2.0)*afc_spectrum[i]; + np=(np+1)&fftxn_mask; + } + // t1, t2 and r2 are sums of squared errors. diff --git a/comms/linrad/files/patch-cwdetect.c b/comms/linrad/files/patch-cwdetect.c new file mode 100644 index 000000000000..f10acc02d144 --- /dev/null +++ b/comms/linrad/files/patch-cwdetect.c @@ -0,0 +1,71 @@ +--- cwdetect.c.orig 2014-11-04 10:25:00 UTC ++++ cwdetect.c +@@ -1857,7 +1857,8 @@ int region, region_flag; + int i,j,k,ia,ib,ja,jb; + int ka,kb,k1,k2,k3; + int mix2_mask, sizhalf, carrfilter_pts; +-float amp,t1,t2,t3,r1,r2; ++//float amp,t1,t2,t3,r1,r2; ++float amp,t1,t2,t3,r2; + double dt1, dt2, dt3; + sizhalf=mix2.size>>1; + mix2_mask=mix2.size-1; +@@ -2250,7 +2251,7 @@ new_carrier:; + if(i>sizhalf)i-=mix2.size; + if(abs(i) > k3)goto fail; + i=k1; +- r1=0; ++ // r1=0; + r2=0; + while(i!=k2) + { +@@ -2258,7 +2259,7 @@ new_carrier:; + if(k>sizhalf)k=mix2.size-k; + if(k<k3) + { +- r1+=mix2_pwr[i]; ++ // r1+=mix2_pwr[i]; + } + else + { +@@ -2266,7 +2267,7 @@ new_carrier:; + } + i=(i+1)&mix2_mask; + } +- r1/=ia; ++ // r1/=ia; + r2/=ib; + ia=(j-k3+mix2.size)&mix2_mask; + ib=(j+k3)&mix2_mask; +@@ -3998,7 +3999,8 @@ void improve_cwspeed(void) + int i, k, n, dashno; + int repeat_flag; + float r1, r3, t1, t2, t3; +-double s_sum, n_sum; ++//double s_sum; ++//, n_sum; + STONDATA *stondt; + stondt=(STONDATA*)(fftn_tmp); + // Collect the average waveform again. +@@ -4016,8 +4018,8 @@ check_cw(2003,1); + if(kill_all_flag)return; + dashno=0; + t3=0; +-s_sum=0; +-n_sum=0; ++//s_sum=0; ++//n_sum=0; + check_cw(22001,1); + if(kill_all_flag)return; + while(cw_ptr<no_of_cwdat) +@@ -4052,8 +4054,8 @@ if(kill_all_flag)return; + cw[cw_ptr+1].sep=cw[cw_ptr+1].midpoint-cg_wave_midpoint; + if(cw[cw_ptr+1].sep < 0)cw[cw_ptr+1].sep+=baseband_size; + } +- s_sum+=cg_wave_dat; +- n_sum+=cg_wave_err; ++ // s_sum+=cg_wave_dat; ++ // n_sum+=cg_wave_err; + stondt[dashno].s=cg_wave_dat; + stondt[dashno].n=cg_wave_err; + stondt[dashno].cwptr=cw_ptr;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112231958.1BNJwrZY004262>