Skip to content

Commit

Permalink
layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 28, 2019
1 parent cd35ecd commit 5441efd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/eez/gui/app_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ void AppContext::updatePage(int i, WidgetCursor &widgetCursor) {
} else {
const Widget *page = getPageWidget(m_pageNavigationStack[i].pageId);

auto savedCurrentState = widgetCursor.currentState;
auto savedPreviousState = widgetCursor.previousState;
auto savedWidget = widgetCursor.widget;

Expand All @@ -357,7 +356,6 @@ void AppContext::updatePage(int i, WidgetCursor &widgetCursor) {
enumWidget(widgetCursor, drawWidgetCallback);

widgetCursor.widget = savedWidget;
widgetCursor.currentState = savedCurrentState;
widgetCursor.previousState = savedPreviousState;
}

Expand Down
1 change: 0 additions & 1 deletion src/eez/gui/widgets/layout_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void LayoutViewWidget_draw(const WidgetCursor &widgetCursor) {
((LayoutViewWidgetState *)widgetCursor.currentState)->context = Value();
}

widgetCursor.currentState->size = sizeof(LayoutViewWidgetState);
widgetCursor.currentState->data = getLayoutId(widgetCursor);

if (layoutViewSpecific->context) {
Expand Down
4 changes: 3 additions & 1 deletion src/eez/modules/mcu/stm32/touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ bool onSystemStateChanged() {
return true;
}

static const int CONF_TOUCH_DEBOUNCE_THRESHOLD = 25;

static const int CONF_TOUCH_Z1_THRESHOLD = 100;

static const uint8_t X_DATA_ID = 0b11000010;
Expand Down Expand Up @@ -90,7 +92,7 @@ void read(bool &isPressed, int &x, int &y) {
uint32_t now = millis();

if (g_wasPressed != isPressedNow) {
if (now - g_time > 25) {
if (now - g_time > CONF_TOUCH_DEBOUNCE_THRESHOLD) {
g_wasPressed = isPressedNow;
g_time = now;
}
Expand Down

0 comments on commit 5441efd

Please sign in to comment.