Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jul 8, 2019
1 parent d4df0d8 commit 7b7a6e7
Show file tree
Hide file tree
Showing 43 changed files with 17,322 additions and 17,176 deletions.
Binary file added images/eez-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
167 changes: 64 additions & 103 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
"name": "EventQueue.events",
"description": "list of events in event queue",
"type": "list",
"defaultValue": "[{}, {}, {}, {}, {}, {}]"
"defaultValue": "[{}, {}, {}, {}, {}, {}, {}, {}]"
},
{
"name": "EventQueue.events.type",
Expand Down Expand Up @@ -1851,9 +1851,6 @@
{
"name": "ch.settings.adv.view.editYTViewRate"
},
{
"name": "error_alert_action"
},
{
"name": "sys.settings.encoder.toggleConfirmationMode"
},
Expand Down Expand Up @@ -9480,66 +9477,6 @@
"width": 480,
"height": 240
},
{
"name": "error_alert_with_action",
"description": "Error message, two line with action",
"style": "error_alert",
"widgets": [
{
"type": "Text",
"style": {
"inheritFrom": "error_alert",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"data": "alert_message",
"left": 0,
"top": 8,
"width": 280,
"height": 28,
"text": ""
},
{
"type": "Text",
"style": {
"inheritFrom": "error_alert_button",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"data": "alert_message_2",
"action": "error_alert_action",
"left": 40,
"top": 36,
"width": 200,
"height": 32,
"text": ""
},
{
"type": "Text",
"style": {
"inheritFrom": "error_alert_button",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"action": "ok",
"left": 110,
"top": 72,
"width": 60,
"height": 32,
"text": "OK"
}
],
"left": 20,
"top": 76,
"width": 280,
"height": 112
},
{
"name": "yes_no",
"description": "Confirmation message",
Expand Down Expand Up @@ -9594,8 +9531,8 @@
"text": "No"
}
],
"left": 20,
"top": 76,
"left": 190,
"top": 92,
"width": 280,
"height": 88
},
Expand Down Expand Up @@ -9739,8 +9676,8 @@
"height": 8
}
],
"left": 20,
"top": 64,
"left": 100,
"top": 80,
"width": 280,
"height": 112
},
Expand Down Expand Up @@ -9814,8 +9751,8 @@
"text": "Later"
}
],
"left": 20,
"top": 76,
"left": 100,
"top": 92,
"width": 280,
"height": 88
},
Expand All @@ -9841,8 +9778,8 @@
"text": ""
}
],
"left": 20,
"top": 76,
"left": 100,
"top": 92,
"width": 280,
"height": 88
},
Expand Down Expand Up @@ -9884,8 +9821,8 @@
"text": ""
}
],
"left": 20,
"top": 76,
"left": 100,
"top": 92,
"width": 280,
"height": 88
},
Expand Down Expand Up @@ -9943,8 +9880,8 @@
"text": "Abort"
}
],
"left": 40,
"top": 58,
"left": 120,
"top": 74,
"width": 240,
"height": 124
},
Expand All @@ -9965,8 +9902,8 @@
"data": "EventQueue.events",
"left": 0,
"top": 0,
"width": 479,
"height": 203,
"width": 480,
"height": 236,
"itemWidget": {
"type": "Select",
"style": {
Expand Down Expand Up @@ -10069,7 +10006,7 @@
},
"data": "EventQueue.multiplePages",
"left": 0,
"top": 204,
"top": 236,
"width": 432,
"height": 36,
"widgets": [
Expand Down Expand Up @@ -10177,7 +10114,7 @@
},
"action": "show_main_page",
"left": 432,
"top": 204,
"top": 236,
"width": 48,
"height": 36,
"text": "X"
Expand All @@ -10186,7 +10123,7 @@
"left": 0,
"top": 0,
"width": 480,
"height": 240
"height": 272
},
{
"name": "keypad",
Expand Down Expand Up @@ -19150,20 +19087,50 @@
"text": "Serial (via USB) settings"
},
{
"type": "Text",
"style": {
"inheritFrom": "edit_value_active_S_left",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"action": "show_sys_settings_ethernet",
"type": "Select",
"style": {},
"activeStyle": {},
"data": "ethernet.installed",
"left": 240,
"top": 28,
"width": 240,
"height": 28,
"text": "Ethernet settings"
"widgets": [
{
"type": "Text",
"style": {
"inheritFrom": "default",
"font": "small",
"alignHorizontal": "left",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"action": "",
"left": 0,
"top": 0,
"width": 240,
"height": 28,
"text": "Ethernet not installed"
},
{
"type": "Text",
"style": {
"inheritFrom": "edit_value_active_S_left",
"padding": 0
},
"activeStyle": {
"padding": 0
},
"action": "show_sys_settings_ethernet",
"left": 0,
"top": 0,
"width": 240,
"height": 28,
"text": "Ethernet settings"
}
]
},
{
"type": "Text",
Expand Down Expand Up @@ -25808,7 +25775,7 @@
{
"type": "Text",
"style": {
"inheritFrom": "toast_alert",
"inheritFrom": "non_interactive_button_S",
"padding": 0
},
"activeStyle": {
Expand All @@ -25824,7 +25791,7 @@
{
"type": "Text",
"style": {
"inheritFrom": "toast_alert",
"inheritFrom": "non_interactive_button_S",
"padding": 0
},
"activeStyle": {
Expand Down Expand Up @@ -36798,7 +36765,8 @@
"name": "error_alert_button",
"inheritFrom": "error_alert",
"color": "#ffff00",
"padding": 0
"padding": 0,
"alwaysBuild": true
},
{
"name": "event_error",
Expand Down Expand Up @@ -37176,14 +37144,6 @@
"color": "#ffffe5",
"padding": 0
},
{
"name": "toast_alert",
"inheritFrom": "default_S",
"backgroundColor": "#808080",
"padding": "20",
"margin": "20",
"alwaysBuild": true
},
{
"name": "yt_graph_U_defualt",
"description": "",
Expand Down Expand Up @@ -237793,7 +237753,8 @@
{
"name": "logo",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuOWwzfk4AAAiiSURBVGhD1Vp5bI1ZFC+tvaiqKmqpnQixh/hD1T7FlDAJQ9oylOmkprVvYYKhtY09IYgtxFpLYgsztKWppSEIVRlLUmO0qC2Unjm/496v33v9Xt9r+5D5Jb+k79xzl/Pde88999x6uAk1mcOY8cxjzOvMf5ivmC/V35ChbAkzjIk63xRVmVHMv5j5T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5k8rMzDTcH94CcIkxzzRSLzpzByYkJKiSz7kiJNtU2c9Mh/BipjIlBfLq1StpADnNLl26GI1jsLiZ4WDTWQsQ2bSHDx9KHSvgPuvt7W3oY6m0adPGJlkMwgvpF58XL17I9VKV4eHD6esNXmPkQSM0NNTYdLjQ443LPABNzBgyGq4kre7cueMwwYu0onmZYoawn1Q5lg4Szy7hO6ak13EDM3sOuNbExESKj4+XfCc8D75ScYElhX2zcOFCeWJCNgKnrAYGP2jQID14HFq9mcXCWKac0EOGDBEv8LWAmezXr58ePMYQziwRYMRHpqxVV+P10uD69euyl9AnE18+klkqhDJlT+BQQ4oFIYa7gSUD961fbZjIlOOlyC1oxsTlQRqHV8DDhnnNlhQYONrCAarbZ15iwpm4FXCxM5j4/wfpCC8n8+bNkzNDuz1XAF3EVoh5dPpeEeFMLNPtD91m1GH+wXzNNDqHC0QyFgcQwgW83mPPwDiEwPv375eykSNHymlsrsvEwFcx/ZlfDTjO8SSF6S7pP3ugbjTTh/lNEcD8kYmveIqZyZTnKkX8ncFE2QrmSKYbvraHx38P8fsyOSyEpgAAAABJRU5ErkJggg==",
"backgroundColor": "#5080ff"
"bpp": 32,
"backgroundColor": "Main back color"
},
{
"name": "bp_coupled",
Expand Down
3 changes: 0 additions & 3 deletions src/eez/apps/home/home.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ HomeAppContext g_homeAppContext;
////////////////////////////////////////////////////////////////////////////////

HomeAppContext::HomeAppContext() {
showPage(PAGE_ID_WELCOME);
}

void HomeAppContext::stateManagment() {
Expand Down Expand Up @@ -161,8 +160,6 @@ void HomeAppContext::onPageTouch(const WidgetCursor &foundWidget, Event &touchEv

eez::mcu::display::setColor(255, 255, 255);
eez::mcu::display::fillRect(x - 1, y - 1, x + 1, y + 1);

g_painted = true;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/eez/apps/home/touch_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void selectTouchCalibrationPoint() {
yesNoDialog(g_yesNoPageId, "Save changes?", dialogYes, dialogNo, dialogCancel);
} else {
startCalibration();
toastMessage("Received data is invalid due to", "imprecise pointing or", "communication problem!");
errorMessage("Received data is invalid due to", "imprecise pointing or", "communication problem!");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/eez/apps/psu/event_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ enum Events { LIST_OF_EVENTS };

////////////////////////////////////////////////////////////////////////////////

static const int EVENTS_PER_PAGE = 7;
static const int EVENTS_PER_PAGE = 8;

////////////////////////////////////////////////////////////////////////////////

Expand Down
20 changes: 16 additions & 4 deletions src/eez/apps/psu/gui/psu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ void onEncoder(int tickCount, int counter, bool clicked);
////////////////////////////////////////////////////////////////////////////////

PsuAppContext::PsuAppContext() {
showPage(PAGE_ID_MAIN);
}

void PsuAppContext::stateManagment() {
if (getActivePageId() == INTERNAL_PAGE_ID_NONE) {
showPage(PAGE_ID_MAIN);
}

AppContext::stateManagment();

// TODO move this to some other place
Expand Down Expand Up @@ -428,17 +431,26 @@ void psuErrorMessage(const data::Cursor &cursor, data::Value value, void (*ok_ca
Channel &channel = Channel::get(iChannel);
if (value.getScpiError() == SCPI_ERROR_VOLTAGE_LIMIT_EXCEEDED) {
if (channel_dispatcher::getULimit(channel) < channel_dispatcher::getUMaxLimit(channel)) {
errorMessageWithAction(value, ok_callback, changeVoltageLimit, "Change voltage limit", iChannel);
if (ok_callback) {
ok_callback();
}
errorMessageWithAction(value, changeVoltageLimit, "Change voltage limit", iChannel);
return;
}
} else if (value.getScpiError() == SCPI_ERROR_CURRENT_LIMIT_EXCEEDED) {
if (channel_dispatcher::getILimit(channel) < channel_dispatcher::getIMaxLimit(channel)) {
errorMessageWithAction(value, ok_callback, changeCurrentLimit, "Change current limit", iChannel);
if (ok_callback) {
ok_callback();
}
errorMessageWithAction(value, changeCurrentLimit, "Change current limit", iChannel);
return;
}
} else if (value.getScpiError() == SCPI_ERROR_POWER_LIMIT_EXCEEDED) {
if (channel_dispatcher::getPowerLimit(channel) < channel_dispatcher::getPowerMaxLimit(channel)) {
errorMessageWithAction(value, ok_callback, changePowerLimit, "Change power limit", iChannel);
if (ok_callback) {
ok_callback();
}
errorMessageWithAction(value, changePowerLimit, "Change power limit", iChannel);
return;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/eez/apps/settings/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ namespace settings {
SettingsAppContext g_settingsAppContext;

SettingsAppContext::SettingsAppContext() {
showPage(PAGE_ID_SYS_SETTINGS);
}

int SettingsAppContext::getMainPageId() {
Expand All @@ -40,4 +39,4 @@ int SettingsAppContext::getMainPageId() {
} // namespace settings
} // namespace eez

#endif
#endif
Loading

0 comments on commit 7b7a6e7

Please sign in to comment.