Selaa lähdekoodia

add backkey timeout return

zack 1 vuosi sitten
vanhempi
commit
608618722a
2 muutettua tiedostoa jossa 2854 lisäystä ja 2853 poistoa
  1. 4 3
      Core/Src/key.c
  2. 2850 2850
      Output/dtu.hex

+ 4 - 3
Core/Src/key.c

@@ -156,7 +156,7 @@ uint8_t KEY_2_Scan(void)
     }
     else
     {
-        if (HAL_GetTick() - debounce_time > 30) // 去抖时间大于30ms
+        if (HAL_GetTick() - debounce_time > 30) // 去抖时间
         {
             if (key_state == GPIO_PIN_RESET) // 按键按下
             {
@@ -279,7 +279,7 @@ uint8_t KEY_3_Scan(void)
     }
     else
     {
-        if (HAL_GetTick() - debounce_time > 30) // 去抖时间大于50ms
+        if (HAL_GetTick() - debounce_time > 30) // 去抖时间
         {
             if (key_state == GPIO_PIN_RESET) // 按键按下
             {
@@ -928,10 +928,11 @@ uint8_t KEY_4_Scan(void)
     }
     else
     {
-        if (HAL_GetTick() - debounce_time > 30) // 去抖时间大于50ms
+        if (HAL_GetTick() - debounce_time > 30) // 去抖时间
         {
             if (key_state == GPIO_PIN_RESET) // 按键按下
             {
+				enterInterface_time = HAL_GetTick();
 				if (!sent4_key) {//返回
 					switch (menu.current) {
 						case 0:

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2850 - 2850
Output/dtu.hex