Skip to content

Commit

Permalink
calibration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jan 18, 2021
1 parent 51f2db4 commit f98c683
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/eez/modules/psu/calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ float Value::getDacValue() {

bool Value::readAdcValue(float &adcValue, int *err) {
Channel *channel = Channel::getBySlotIndex(editor.m_slotIndex, editor.m_subchannelIndex);
return channel ?
(type == CALIBRATION_VALUE_U ? channel->u.mon_last : channel->i.mon_last) :
g_slots[editor.m_slotIndex]->calibrationReadAdcValue(editor.m_subchannelIndex, adcValue, err);
if (channel) {
adcValue = type == CALIBRATION_VALUE_U ? channel->u.mon_last : channel->i.mon_last;
return true;
}
return g_slots[editor.m_slotIndex]->calibrationReadAdcValue(editor.m_subchannelIndex, adcValue, err);
}

bool Value::checkValueAndAdc(float value, float adc) {
Expand Down Expand Up @@ -379,8 +381,6 @@ void CalibrationEditor::doStart() {
profile::saveToLocation(10);
profile::setFreezeState(true);

reset();

selectCurrentRange(0);

m_enabled = true;
Expand Down

0 comments on commit f98c683

Please sign in to comment.