Skip to content

Commit

Permalink
remapOutQuad
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Aug 16, 2019
1 parent d85e5b4 commit 8ea38a9
Show file tree
Hide file tree
Showing 10 changed files with 417 additions and 296 deletions.
2 changes: 1 addition & 1 deletion src/eez/apps/psu/conf_advanced.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define PSU_SERIAL "0000000"

/// Firmware version.
#define FIRMWARE "v1.2"
#define FIRMWARE "M1"

/// Manufacturer description text used for *IDN?
#define IDN_MANUFACTURER "Envox"
Expand Down
13 changes: 0 additions & 13 deletions src/eez/apps/psu/persist_conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ using namespace eez::mcu::display;

#include <eez/gui/widgets/yt_graph.h>

#define NUM_CHANNELS_VIEW_MODES 4

#define CHANNELS_VIEW_MODE_NUMERIC 0
#define CHANNELS_VIEW_MODE_HORZ_BAR 1
#define CHANNELS_VIEW_MODE_VERT_BAR 2
#define CHANNELS_VIEW_MODE_YT 3

#define NUM_CHANNELS_VIEW_MODES_IN_MAX 3

#define CHANNELS_VIEW_MODE_IN_MAX_NUMERIC 0
#define CHANNELS_VIEW_MODE_IN_MAX_HORZ_BAR 1
#define CHANNELS_VIEW_MODE_IN_MAX_YT 2

namespace eez {
namespace psu {

Expand Down
13 changes: 13 additions & 0 deletions src/eez/apps/psu/persist_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@

#pragma once

#define NUM_CHANNELS_VIEW_MODES 4

#define CHANNELS_VIEW_MODE_NUMERIC 0
#define CHANNELS_VIEW_MODE_HORZ_BAR 1
#define CHANNELS_VIEW_MODE_VERT_BAR 2
#define CHANNELS_VIEW_MODE_YT 3

#define NUM_CHANNELS_VIEW_MODES_IN_MAX 3

#define CHANNELS_VIEW_MODE_IN_MAX_NUMERIC 0
#define CHANNELS_VIEW_MODE_IN_MAX_HORZ_BAR 1
#define CHANNELS_VIEW_MODE_IN_MAX_YT 2

namespace eez {
namespace psu {

Expand Down
12 changes: 12 additions & 0 deletions src/eez/gui/action_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,19 @@ void action_toggle_channels_view_mode() {

void action_toggle_channels_max_view() {
selectChannel();

auto channelsIsMaxView = persist_conf::devConf.flags.channelsIsMaxView;
auto channelMax = persist_conf::devConf.flags.channelMax;

persist_conf::toggleChannelsMaxView(g_channel->index);

if (!channelsIsMaxView && persist_conf::devConf.flags.channelsIsMaxView) {
animateFromDefaultViewToMaxView();
} else if (channelsIsMaxView && !persist_conf::devConf.flags.channelsIsMaxView) {
animateFromMaxViewToDefaultView();
} else {
animateFromMinViewToMaxView(channelMax);
}
}

void action_ethernet_toggle() {
Expand Down
Loading

0 comments on commit 8ea38a9

Please sign in to comment.