Skip to content

Commit

Permalink
FIX: EMTR calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-valkov committed Jul 27, 2016
1 parent f8d6722 commit 30ad7c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions IoT Firmware/olimex/user/modules/mod_emtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,6 @@ void ICACHE_FLASH_ATTR emtr_calibration_calc(
uint16 *gain;
uint32 new_gain;

if (measured == 0) {
return;
}

if (range_shift == 0) {
measured = output->voltage_rms;
expected = calibration->calibration_voltage;
Expand All @@ -528,6 +524,10 @@ void ICACHE_FLASH_ATTR emtr_calibration_calc(
return;
}

if (measured == 0) {
return;
}

uint32 range = emtr_get_range(calibration, range_shift);

calc:
Expand Down

0 comments on commit 30ad7c9

Please sign in to comment.