Skip to content

Commit

Permalink
smaller gui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Apr 5, 2020
1 parent c2d73ff commit 08b49ba
Show file tree
Hide file tree
Showing 9 changed files with 44,187 additions and 43,712 deletions.
790 changes: 594 additions & 196 deletions modular-psu-firmware.eez-project

Large diffs are not rendered by default.

49,070 changes: 24,551 additions & 24,519 deletions src/eez/gui/document_simulator.cpp

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/eez/gui/document_simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ enum DataEnum {
DATA_ID_DEBUG_VARIABLES = 404,
DATA_ID_DEBUG_VARIABLE_NAME = 405,
DATA_ID_DEBUG_VARIABLE_VALUE = 406,
DATA_ID_CHANNEL_RAMP_STATE = 407
DATA_ID_CHANNEL_RAMP_STATE = 407,
DATA_ID_RAMP_AND_DELAY_LIST_SCROLLBAR_ENABLED = 408
};

void data_none(DataOperationEnum operation, Cursor cursor, Value &value);
Expand Down Expand Up @@ -817,6 +818,7 @@ void data_debug_variables(DataOperationEnum operation, Cursor cursor, Value &val
void data_debug_variable_name(DataOperationEnum operation, Cursor cursor, Value &value);
void data_debug_variable_value(DataOperationEnum operation, Cursor cursor, Value &value);
void data_channel_ramp_state(DataOperationEnum operation, Cursor cursor, Value &value);
void data_ramp_and_delay_list_scrollbar_enabled(DataOperationEnum operation, Cursor cursor, Value &value);

typedef void (*DataOperationsFunction)(DataOperationEnum operation, Cursor cursor, Value &value);

Expand Down Expand Up @@ -1686,4 +1688,4 @@ enum PagesEnum {
PAGE_ID_FOCUS_VALUE_OVERLAY = 167
};

extern const uint8_t assets[402744];
extern const uint8_t assets[403233];
38,015 changes: 19,023 additions & 18,992 deletions src/eez/gui/document_stm32.cpp

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/eez/gui/document_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ enum DataEnum {
DATA_ID_DEBUG_VARIABLES = 396,
DATA_ID_DEBUG_VARIABLE_NAME = 397,
DATA_ID_DEBUG_VARIABLE_VALUE = 398,
DATA_ID_CHANNEL_RAMP_STATE = 399
DATA_ID_CHANNEL_RAMP_STATE = 399,
DATA_ID_RAMP_AND_DELAY_LIST_SCROLLBAR_ENABLED = 400
};

void data_none(DataOperationEnum operation, Cursor cursor, Value &value);
Expand Down Expand Up @@ -801,6 +802,7 @@ void data_debug_variables(DataOperationEnum operation, Cursor cursor, Value &val
void data_debug_variable_name(DataOperationEnum operation, Cursor cursor, Value &value);
void data_debug_variable_value(DataOperationEnum operation, Cursor cursor, Value &value);
void data_channel_ramp_state(DataOperationEnum operation, Cursor cursor, Value &value);
void data_ramp_and_delay_list_scrollbar_enabled(DataOperationEnum operation, Cursor cursor, Value &value);

typedef void (*DataOperationsFunction)(DataOperationEnum operation, Cursor cursor, Value &value);

Expand Down Expand Up @@ -1653,4 +1655,4 @@ enum PagesEnum {
PAGE_ID_FOCUS_VALUE_OVERLAY = 162
};

extern const uint8_t assets[310126];
extern const uint8_t assets[310597];
6 changes: 6 additions & 0 deletions src/eez/modules/psu/gui/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5750,6 +5750,12 @@ void data_ramp_and_delay_list(DataOperationEnum operation, Cursor cursor, Value
}
}

void data_ramp_and_delay_list_scrollbar_enabled(DataOperationEnum operation, Cursor cursor, Value &value) {
if (operation == DATA_OPERATION_GET) {
value = (uint32_t)count(DATA_ID_RAMP_AND_DELAY_LIST) > ytDataGetPageSize(cursor, DATA_ID_RAMP_AND_DELAY_LIST);
}
}

void data_channel_ramp_state(DataOperationEnum operation, Cursor cursor, Value &value) {
if (operation == DATA_OPERATION_GET) {
auto page = (SysSettingsRampAndDelayPage *)getPage(PAGE_ID_SYS_SETTINGS_RAMP_AND_DELAY);
Expand Down
3 changes: 3 additions & 0 deletions src/eez/modules/psu/gui/file_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <eez/modules/psu/scpi/psu.h>

#include <eez/modules/psu/gui/psu.h>
#include <eez/modules/psu/gui/animations.h>
#include <eez/modules/psu/gui/file_manager.h>
#include <eez/modules/psu/gui/keypad.h>

Expand Down Expand Up @@ -463,6 +464,7 @@ void goToParentDirectory() {

g_filesStartPosition = 0;
loadDirectory();
animateFadeOutFadeInWorkingArea();
}

uint32_t getFilesCount() {
Expand Down Expand Up @@ -612,6 +614,7 @@ void selectFile(uint32_t fileIndex) {
strcat(g_currentDirectory, fileItem->name);
g_filesStartPosition = 0;
loadDirectory();
animateFadeOutFadeInWorkingArea();
}
} else {
g_selectedFileIndex = fileIndex;
Expand Down
2 changes: 1 addition & 1 deletion src/eez/modules/psu/gui/page_ch_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ void ChSettingsListsPage::moveCursorToFirstAvailableCell() {
}

int ChSettingsListsPage::getDirty() {
return m_listVersion > 0 || m_listCount != m_listCountOrig || m_triggerOnListStop || m_triggerOnListStopOrig;
return m_listVersion > 0 || m_listCount != m_listCountOrig || m_triggerOnListStop != m_triggerOnListStopOrig;
}

void ChSettingsListsPage::set() {
Expand Down
1 change: 1 addition & 0 deletions src/eez/modules/psu/gui/psu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ bool isSysSettingsSubPage(int pageId) {
pageId == PAGE_ID_SYS_SETTINGS_SERIAL ||
pageId == PAGE_ID_SYS_SETTINGS_ETHERNET ||
pageId == PAGE_ID_SYS_SETTINGS_TRIGGER ||
pageId == PAGE_ID_SYS_SETTINGS_RAMP_AND_DELAY ||
pageId == PAGE_ID_SYS_SETTINGS_DISPLAY ||
pageId == PAGE_ID_SYS_SETTINGS_SOUND ||
pageId == PAGE_ID_SYS_INFO;
Expand Down

0 comments on commit 08b49ba

Please sign in to comment.