rotary handling works better with only one interrupt and shorter debouncing time

This commit is contained in:
Wolfgang Hottgenroth 2017-06-12 18:03:09 +02:00
parent 7f54b22e6b
commit afcb0326a1
2 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
rotary_a_interrupt(); rotary_a_interrupt();
} }
if (GPIO_Pin == GPIO_PIN_4) { if (GPIO_Pin == GPIO_PIN_4) {
rotary_b_interrupt(); // rotary_b_interrupt();
} }
} }

View File

@ -8,8 +8,8 @@
#ifndef SWITCHES_H_ #ifndef SWITCHES_H_
#define SWITCHES_H_ #define SWITCHES_H_
const uint32_t DEBOUNCING_DEAD_TIME = 100; const uint32_t DEBOUNCING_DEAD_TIME = 25;
const uint32_t DEBOUNCING_REPEAT = 20; const uint32_t DEBOUNCING_REPEAT = 2;
const uint32_t LONG_BUTTON_TIME = 1000; const uint32_t LONG_BUTTON_TIME = 1000;
void buttonShort(); void buttonShort();