change direction every time

This commit is contained in:
interfisch 2019-10-12 17:02:04 +02:00
parent c36f332189
commit 4995e2a69e
1 changed files with 6 additions and 3 deletions

View File

@ -216,12 +216,15 @@ void loopHandler() {
if (!sleep) { //only change values if not in sleep mode
// Button A Longpress Handling
if (flag_btnAholdstart) {
/* //Change only hold direction at extremes
if (set_brightness>=BRIGHTNESS_MAX) { //if hold started with brightness at one extreme
holdDirection_brightness=false; //direction decrease
}
if (set_brightness<=BRIGHTNESS_MIN) { //if hold started with brightness at one extreme
holdDirection_brightness=true; //direction increase
}
*/
holdDirection_brightness=!holdDirection_brightness; //change direction everytime
}
if (flag_btnAhold) { //brightness
@ -241,15 +244,15 @@ void loopHandler() {
// Button B Longpress Handling
if (flag_btnBholdstart) {
if (set_temperature>=TEMPERATURE_MAX || set_temperature<=TEMPERATURE_MIN) { //if hold started with brightness at one extreme
holdDirection_temperature=!holdDirection_temperature; //invert direction
}
/* //Change only hold direction at extremes
if (set_temperature>=TEMPERATURE_MAX) { //if hold started with brightness at one extreme
holdDirection_temperature=false; //direction decrease
}
if (set_temperature<=TEMPERATURE_MIN) { //if hold started with brightness at one extreme
holdDirection_temperature=true; //direction increase
}
*/
holdDirection_temperature=!holdDirection_temperature; //change direction everytime
}
if (flag_btnBhold) { //brightness
if (holdDirection_temperature) {