# HG changeset patch # User Daniele Nicolodi # Date 1436475943 -7200 # Node ID dfbee05fe464bc545544a8a60b37ab64dc86f5c4 # Parent da38cbbc7ec8ba6ef234716d9896e75ff6d2c2cd Fix beatnote sign measurement Breakage was caused by the change of the LO, HG, SR, enum values to use them as array indexes assigning to LO value 0 and thus flase in boolean context. diff -r da38cbbc7ec8 -r dfbee05fe464 FXAnalyse.c --- a/FXAnalyse.c Sun Jun 21 14:44:33 2015 +0200 +++ b/FXAnalyse.c Thu Jul 09 23:05:43 2015 +0200 @@ -257,7 +257,9 @@ enum { - LO, + NONE = -1, + LO = 0, + MICROWAVE = LO, HG, SR, _N_BEATS, @@ -335,7 +337,7 @@ }; struct beatsign beatsign = { - .measure = 0, + .measure = NONE, }; @@ -1493,7 +1495,7 @@ } // beatnote sign determination - if ((beatsign.measure) && + if ((beatsign.measure != NONE) && (utc > beatsign.t0 + 2.0)) { int f_beat_sign, f_rep_sign = 0; @@ -1523,7 +1525,7 @@ SetCtrlVal(MainPanel, PANEL_DDS1, ad9912.frequency[0]); // measurement done - beatsign.measure = 0; + beatsign.measure = NONE; // in the case of the optical beatnotes sign measurement // we induce fairly small steps in f_rep therefore it is