Просмотр исходного кода

Invert settings up/down keys effect.

antirez 3 лет назад
Родитель
Сommit
a0c78b837f
2 измененных файлов с 6 добавлено и 6 удалено
  1. 2 2
      app_subghz.c
  2. 4 4
      view_settings.c

+ 2 - 2
app_subghz.c

@@ -13,8 +13,8 @@ ProtoViewModulation ProtoViewModulations[] = {
     {"2FSK 47.6Khz", FuriHalSubGhzPreset2FSKDev476Async, NULL},
     {"MSK", FuriHalSubGhzPresetMSK99_97KbAsync, NULL},
     {"GFSK", FuriHalSubGhzPresetGFSK9_99KbAsync, NULL},
-    {"TPMS FSK 28.56Khz", 0, (uint8_t*)protoview_subghz_tpms1_async_regs},
-    {"TPMS FSK 47.6Khz", 0, (uint8_t*)protoview_subghz_tpms2_async_regs},
+    {"TPMS FSK 28Khz", 0, (uint8_t*)protoview_subghz_tpms1_async_regs},
+    {"TPMS FSK 47Khz", 0, (uint8_t*)protoview_subghz_tpms2_async_regs},
     {NULL, 0, NULL} /* End of list sentinel. */
 };
 

+ 4 - 4
view_settings.c

@@ -60,9 +60,9 @@ void process_input_settings(ProtoViewApp *app, InputEvent input) {
             if (i == count) return; /* Should never happen. */
 
             if (input.key == InputKeyUp) {
-                curidx = (curidx+1) % count;
-            } else if (input.key == InputKeyDown) {
                 curidx = curidx == 0 ? count-1 : curidx-1;
+            } else if (input.key == InputKeyDown) {
+                curidx = (curidx+1) % count;
             } else {
                 return;
             }
@@ -73,9 +73,9 @@ void process_input_settings(ProtoViewApp *app, InputEvent input) {
 
             while(ProtoViewModulations[count].name != NULL) count++;
             if (input.key == InputKeyUp) {
-                modid = (modid+1) % count;
-            } else if (input.key == InputKeyDown) {
                 modid = modid == 0 ? count-1 : modid-1;
+            } else if (input.key == InputKeyDown) {
+                modid = (modid+1) % count;
             } else {
                 return;
             }