Skip to content

Commit

Permalink
touch calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Sep 7, 2019
1 parent 447ccbf commit 4c63670
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 24 deletions.
91 changes: 69 additions & 22 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -3094,6 +3094,29 @@
"width": 480,
"height": 272,
"widgets": [
{
"type": "MultilineText",
"style": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#404040",
"backgroundColor": "#c0c0c0",
"borderRadius": 4,
"padding": "10"
},
"activeStyle": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#c0c0c0",
"backgroundColor": "#404040",
"borderRadius": 4
},
"left": 105,
"top": 95,
"width": 270,
"height": 82,
"text": "Touch top-left cross in the\\n center until turns green."
},
{
"type": "Text",
"style": {
Expand Down Expand Up @@ -3128,6 +3151,29 @@
"width": 480,
"height": 272,
"widgets": [
{
"type": "MultilineText",
"style": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#404040",
"backgroundColor": "#c0c0c0",
"borderRadius": 4,
"padding": "10"
},
"activeStyle": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#c0c0c0",
"backgroundColor": "#404040",
"borderRadius": 4
},
"left": 99,
"top": 95,
"width": 282,
"height": 82,
"text": "Touch bottom-right cross in\\nthe center until turns green."
},
{
"type": "Text",
"style": {
Expand Down Expand Up @@ -3162,6 +3208,29 @@
"width": 480,
"height": 272,
"widgets": [
{
"type": "MultilineText",
"style": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#404040",
"backgroundColor": "#c0c0c0",
"borderRadius": 4,
"padding": "10"
},
"activeStyle": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#c0c0c0",
"backgroundColor": "#404040",
"borderRadius": 4
},
"left": 100,
"top": 95,
"width": 280,
"height": 82,
"text": "Touch top-right cross in the\\n center until turns green."
},
{
"type": "Text",
"style": {
Expand All @@ -3182,28 +3251,6 @@
]
}
]
},
{
"type": "Text",
"style": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#404040",
"backgroundColor": "#c0c0c0",
"borderRadius": 4
},
"activeStyle": {
"inheritFrom": "default",
"font": "Oswald17",
"color": "#c0c0c0",
"backgroundColor": "#404040",
"borderRadius": 4
},
"left": 60,
"top": 106,
"width": 360,
"height": 60,
"text": "Touch cross until turns green."
}
],
"left": 0,
Expand Down
6 changes: 5 additions & 1 deletion src/eez/apps/home/touch_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ void startCalibration() {
void leaveCalibrationMode() {
showPage(g_nextPageId);

if (g_nextPageId == PAGE_ID_SYS_SETTINGS_DISPLAY) {
infoMessage("Touch screen is calibrated.");
}

Channel::restoreOE();
}
}

void dialogYes() {
persist_conf::devConf.touch_screen_cal_tlx = g_points[0].x;
Expand Down
2 changes: 1 addition & 1 deletion src/eez/gui/action_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void action_keypad_option2() {
}

void action_enter_touch_calibration() {
home::enterTouchCalibration();
home::enterTouchCalibration(PAGE_ID_TOUCH_CALIBRATION_YES_NO_CANCEL, PAGE_ID_SYS_SETTINGS_DISPLAY);
}

void action_yes() {
Expand Down

0 comments on commit 4c63670

Please sign in to comment.