Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Aug 27, 2018
1 parent 778d758 commit 94a19d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eez_psu_sketch/gui_psu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,17 @@ void channelToggleOutput() {
void channelInitiateTrigger() {
popPage();
int err = trigger::initiate();
if (err != SCPI_RES_OK) {
if (err == SCPI_RES_OK) {
Channel& channel = Channel::get(g_toggleOutputWidgetCursor.cursor.i >= 0 ? g_toggleOutputWidgetCursor.cursor.i : 0);
channel_dispatcher::outputEnable(channel, true);
} else {
mw::gui::errorMessage(g_toggleOutputWidgetCursor.cursor, data::MakeScpiErrorValue(err));
}
}

void channelSetToFixed() {
popPage();

Channel& channel = Channel::get(g_toggleOutputWidgetCursor.cursor.i >= 0 ? g_toggleOutputWidgetCursor.cursor.i : 0);
if (channel_dispatcher::getVoltageTriggerMode(channel) != TRIGGER_MODE_FIXED) {
channel_dispatcher::setVoltageTriggerMode(channel, TRIGGER_MODE_FIXED);
Expand Down

0 comments on commit 94a19d3

Please sign in to comment.