fix naive calibration header logic

pull/6/head
Ahmet Inan 2014-11-24 20:10:10 +01:00
rodzic 273c97fb65
commit e9afd08451
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -443,7 +443,7 @@ void decode(int samples) {
int leader_level = dat_active && dat_quantized == 0;
int leader_pulse = !leader_level && leader_counter >= leader_length;
leader_counter = leader_level ? leader_counter + 1 : 0;
calibration_progress = leader_pulse && calibration_progress != 1 ? (calibration_progress == 2 ? 1 : 3) : calibration_progress;
calibration_progress = leader_pulse && calibration_progress != 1 ? (calibration_progress == 2 ? 3 : 1) : calibration_progress;
calibration_timeout = leader_pulse && calibration_progress == 1 ? calibration_length : calibration_timeout;
int break_level = cnt_active && cnt_quantized == 0;