Skip to content

Commit 19f1e59

Browse files
committed
1 parent f5cdc69 commit 19f1e59

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/eez/modules/psu/channel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,15 +844,15 @@ void Channel::addIMonAdcValue(float value) {
844844
value = remapAdcValue(value, cal_conf.i[flags.currentCurrentRange]);
845845
}
846846

847-
i.addMonValue(value, getCurrentResolution());
847+
i.addMonValue(value, getCurrentResolution(value));
848848
}
849849

850850
void Channel::addUMonDacAdcValue(float value) {
851851
u.addMonDacValue(value, getVoltageResolution());
852852
}
853853

854854
void Channel::addIMonDacAdcValue(float value) {
855-
i.addMonDacValue(value, getCurrentResolution());
855+
i.addMonDacValue(value, getCurrentResolution(value));
856856
}
857857

858858
void Channel::onAdcData(AdcDataType adcDataType, float value) {

src/eez/modules/psu/channel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ struct Channel {
583583
void setCurrentRange(uint8_t currentRange);
584584

585585
float getVoltageResolution() const;
586-
float getCurrentResolution(float value = NAN) const;
586+
float getCurrentResolution(float value) const;
587587
float getPowerResolution() const;
588588

589589
bool isMicroAmperAllowed() const;

src/eez/modules/psu/channel_dispatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,7 @@ void getCurrentStepValues(int slotIndex, int subchannelIndex, StepValues *stepVa
23132313
float getCurrentResolution(int slotIndex, int subchannelIndex) {
23142314
Channel *channel = Channel::getBySlotIndex(slotIndex, subchannelIndex);
23152315
if (channel) {
2316-
return channel->getCurrentResolution();
2316+
return channel->getCurrentResolution(NAN);
23172317
} else {
23182318
return g_slots[slotIndex]->getCurrentResolution(subchannelIndex);
23192319
}

src/eez/modules/psu/gui/psu.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,8 @@ void NumberInputParams::onCancel() {
818818
float PsuAppContext::numberInput(const char *label, Unit unit, float min, float max, float value) {
819819
m_inputLabel = label[0] ? label : nullptr;
820820

821+
m_numberInputParams.m_options = NumericKeypadOptions();
822+
821823
m_numberInputParams.m_options.editValueUnit = unit;
822824
m_numberInputParams.m_options.min = min;
823825
m_numberInputParams.m_options.enableMinButton();
@@ -860,6 +862,8 @@ void IntegerInputParams::onCancel() {
860862
bool PsuAppContext::integerInput(const char *label, int32_t min, int32_t max, int32_t &value) {
861863
m_inputLabel = label[0] ? label : nullptr;
862864

865+
m_numberInputParams.m_options = NumericKeypadOptions();
866+
863867
m_integerInputParams.m_options.editValueUnit = UNIT_UNKNOWN;
864868
m_integerInputParams.m_options.min = (float)min;
865869
m_integerInputParams.m_options.enableMinButton();

0 commit comments

Comments
 (0)