Mercurial > public > ostc4
changeset 108:f561c79b0546 FlipDisplay
Flip key assigment if needed
author | Ideenmodellierer |
---|---|
date | Tue, 01 Jan 2019 21:00:13 +0100 |
parents | 926098fb116a |
children | 65a6e352ce08 |
files | Discovery/Src/base.c |
diffstat | 1 files changed, 29 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/base.c Tue Jan 01 20:59:36 2019 +0100 +++ b/Discovery/Src/base.c Tue Jan 01 21:00:13 2019 +0100 @@ -781,6 +781,8 @@ uint8_t action = 0; SStateList status; + SSettings* pSettings; + pSettings = settingsGetPointer(); if(GPIO_Pin == VSYNC_IRQ_PIN) // rechts, unten { @@ -816,18 +818,34 @@ return; if(GPIO_Pin == BUTTON_BACK_PIN) // links - action = ACTION_BUTTON_BACK; - else - if(GPIO_Pin == BUTTON_ENTER_PIN) // mitte - action = ACTION_BUTTON_ENTER; + { + if(!pSettings->FlipDisplay) + { + action = ACTION_BUTTON_BACK; + } + else + { + action = ACTION_BUTTON_NEXT; + } + } else - if(GPIO_Pin == BUTTON_NEXT_PIN) // rechts - action = ACTION_BUTTON_NEXT; -#ifdef BUTTON_CUSTOM_PIN - else - if(GPIO_Pin == BUTTON_CUSTOM_PIN) // extra - action = ACTION_BUTTON_CUSTOM; -#endif + { + if(GPIO_Pin == BUTTON_ENTER_PIN) // mitte + action = ACTION_BUTTON_ENTER; + else + { + if(GPIO_Pin == BUTTON_NEXT_PIN) // rechts + { + if(!pSettings->FlipDisplay) action = ACTION_BUTTON_NEXT; + else action = ACTION_BUTTON_BACK; + } + } + } + #ifdef BUTTON_CUSTOM_PIN + else + if(GPIO_Pin == BUTTON_CUSTOM_PIN) // extra + action = ACTION_BUTTON_CUSTOM; + #endif #ifdef DEMOMODE // user pressed button ? if((!demoMachineCall) && demoModeActive())