Browse Source

Вернул старую логику фильтра кнопки энкодера.

TelenkovDmitry 2 weeks ago
parent
commit
78d0fef397
3 changed files with 5 additions and 5 deletions
  1. 5 5
      desk/user/hal_callback.cpp
  2. BIN
      output/desk.bin
  3. 0 0
      project/ewarm/settings/tuber.wsdt

+ 5 - 5
desk/user/hal_callback.cpp

@@ -19,19 +19,19 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
 {
 {
     static uint32_t delay_cnt = 0;
     static uint32_t delay_cnt = 0;
     static bool push_flag = false;
     static bool push_flag = false;
-    uint32_t tick = HAL_GetTick();
+    //uint32_t tick = HAL_GetTick();
     
     
     if (GPIO_Pin == GPIO_PIN_4)
     if (GPIO_Pin == GPIO_PIN_4)
     {
     {
-        DBG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_6);
-        menu_send_event(CONTROL_PUSH);
-#if 0                
+        //DBG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_6);
+        //menu_send_event(CONTROL_PUSH);
+#if 1                
         if (push_flag == false) {
         if (push_flag == false) {
             push_flag = true;
             push_flag = true;
             delay_cnt = HAL_GetTick();
             delay_cnt = HAL_GetTick();
         }
         }
         if (push_flag == true) {
         if (push_flag == true) {
-            if ((tick - delay_cnt) > BUTTON_GLICH_TIMEOUT) {
+            if ((HAL_GetTick() - delay_cnt) > BUTTON_GLICH_TIMEOUT) {
                 push_flag = false;
                 push_flag = false;
                 DBG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_6);
                 DBG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_6);
                 menu_send_event(CONTROL_PUSH);
                 menu_send_event(CONTROL_PUSH);

BIN
output/desk.bin


File diff suppressed because it is too large
+ 0 - 0
project/ewarm/settings/tuber.wsdt


Some files were not shown because too many files changed in this diff