comparison FXAnalyse.c @ 222:db051dbf8d6e

Bitwise vs logical and fix
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 18 Sep 2014 18:02:20 +0200
parents c14f5a95850d
children 7875436125dd
comparison
equal deleted inserted replaced
221:c14f5a95850d 222:db051dbf8d6e
1298 f = Ch2 * 1062.5 / 1542.2; 1298 f = Ch2 * 1062.5 / 1542.2;
1299 break; 1299 break;
1300 } 1300 }
1301 1301
1302 // stop dedrift if the comb is not locked 1302 // stop dedrift if the comb is not locked
1303 if ((dedrift.enabled) 1303 if ((dedrift.enabled) &&
1304 & (dedrift.threshold != 0.0) 1304 (dedrift.threshold != 0.0) &&
1305 & (freq.previous != 0.0) 1305 (freq.previous != 0.0) &&
1306 & (fabs(f - freq.previous) > dedrift.threshold)) { 1306 (fabs(f - freq.previous) > dedrift.threshold)) {
1307 1307
1308 if (! dedrift.keep_slope) { 1308 if (! dedrift.keep_slope) {
1309 dedrift.applied = 0.0; 1309 dedrift.applied = 0.0;
1310 ad9956_set_sweep_rate_w(&ad9956, dedrift.applied); 1310 ad9956_set_sweep_rate_w(&ad9956, dedrift.applied);
1311 SetCtrlVal(MainPanel, PANEL_SLOPE_APPLIED, dedrift.applied); 1311 SetCtrlVal(MainPanel, PANEL_SLOPE_APPLIED, dedrift.applied);