Fix style warnings

This commit is contained in:
Mario Hüttel 2021-10-10 20:40:40 +02:00
parent 2ab7257fe6
commit 7be6047e04
3 changed files with 24 additions and 23 deletions

View File

@ -315,7 +315,8 @@ static inline __attribute__((optimize("O3"))) void adc_pt1000_filter(float adc_p
stable_sample_counter = 0; stable_sample_counter = 0;
alpha = ADC_PT1000_FILTER_WEIGHT_FAST; alpha = ADC_PT1000_FILTER_WEIGHT_FAST;
if (old_state != 1) { if (old_state != 1) {
safety_controller_report_error_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE, MEAS_ADC_SAFETY_FLAG_KEY); safety_controller_report_error_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE,
MEAS_ADC_SAFETY_FLAG_KEY);
old_state = 1; old_state = 1;
} }
} else { } else {
@ -323,7 +324,8 @@ static inline __attribute__((optimize("O3"))) void adc_pt1000_filter(float adc_p
if (old_state != 2) { if (old_state != 2) {
stable_sample_counter++; stable_sample_counter++;
if (stable_sample_counter >= ADC_PT1000_FILTER_STABLE_SAMPLE_COUNT) { if (stable_sample_counter >= ADC_PT1000_FILTER_STABLE_SAMPLE_COUNT) {
safety_controller_ack_flag_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE, MEAS_ADC_SAFETY_FLAG_KEY); safety_controller_ack_flag_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE,
MEAS_ADC_SAFETY_FLAG_KEY);
old_state = 2; old_state = 2;
} }
} }

View File

@ -172,11 +172,10 @@ void loudspeaker_set(uint16_t val)
{ {
loudspeaker_val = val; loudspeaker_val = val;
if (!val) { if (!val)
loudspeaker_stop_beep(); loudspeaker_stop_beep();
} else { else
loudspeaker_start_beep(val); loudspeaker_start_beep(val);
}
} }
uint16_t loudspeaker_get(void) uint16_t loudspeaker_get(void)

View File

@ -1,22 +1,22 @@
/* Reflow Oven Controller /* Reflow Oven Controller
* *
* Copyright (C) 2021 Mario Hüttel <mario.huettel@gmx.net> * Copyright (C) 2021 Mario Hüttel <mario.huettel@gmx.net>
* *
* This file is part of the Reflow Oven Controller Project. * This file is part of the Reflow Oven Controller Project.
* *
* The reflow oven controller is free software: you can redistribute it and/or modify * The reflow oven controller is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful, * The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with the reflow oven controller project. * along with the reflow oven controller project.
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* @addtogroup hw-version-detect * @addtogroup hw-version-detect