adc_inputs: code style

This commit is contained in:
Andrey Gusakov 2024-05-05 19:21:48 +03:00 committed by rusefillc
parent 7a8f0cc511
commit e2955fcb34
1 changed files with 4 additions and 5 deletions

View File

@ -173,11 +173,10 @@ static void fast_adc_callback(GPTDriver*) {
* will be executed in parallel to the current PWM cycle and will
* terminate before the next PWM cycle.
*/
chSysLockFromISR()
;
if (ADC_FAST_DEVICE.state != ADC_READY &&
ADC_FAST_DEVICE.state != ADC_COMPLETE &&
ADC_FAST_DEVICE.state != ADC_ERROR) {
chSysLockFromISR();
if ((ADC_FAST_DEVICE.state != ADC_READY) &&
(ADC_FAST_DEVICE.state != ADC_COMPLETE) &&
(ADC_FAST_DEVICE.state != ADC_ERROR)) {
engine->outputChannels.fastAdcErrorsCount++;
// todo: when? why? criticalError("ADC fast not ready?");
// see notes at https://github.com/rusefi/rusefi/issues/6399