diff Discovery/Src/settings.c @ 93:3d6ccfb0190b kittz

a bit of
author Dmitry Romanov <kitt@bk.ru>
date Mon, 26 Nov 2018 11:38:06 +0300
parents be35821a4974
children 2a74647d28d1
line wrap: on
line diff
--- a/Discovery/Src/settings.c	Mon Nov 26 10:50:39 2018 +0300
+++ b/Discovery/Src/settings.c	Mon Nov 26 11:38:06 2018 +0300
@@ -55,7 +55,7 @@
 {
     .versionFirst   = 1,
     .versionSecond 	= 4,
-    .versionThird   = 6,
+    .versionThird   = 7,
     .versionBeta    = 2,
 
     /* 4 bytes with trailing 0 */
@@ -1045,29 +1045,29 @@
 /*	uint8_t ButtonResponsiveness[4];
  */
     // Base value, index 3
-    if(Settings.ButtonResponsiveness[3] < 70)
+    if(Settings.ButtonResponsiveness[3] < MIN_BUTTONRESPONSIVENESS_GUI)
     {
-        Settings.ButtonResponsiveness[3] = 70;
+        Settings.ButtonResponsiveness[3] = MIN_BUTTONRESPONSIVENESS_GUI;
         corrections++;
     }
     else
-    if(Settings.ButtonResponsiveness[3] > 110)
+    if(Settings.ButtonResponsiveness[3] > MIN_BUTTONRESPONSIVENESS_GUI)
     {
-        Settings.ButtonResponsiveness[3] = 130;
+        Settings.ButtonResponsiveness[3] = MIN_BUTTONRESPONSIVENESS;
         corrections++;
     }
     // flex values 0, 1, 2
     for(int i=0; i<3;i++)
     {
-        if(Settings.ButtonResponsiveness[i] < 40) // 50-10  //Fix for broken buttons. :)
+        if(Settings.ButtonResponsiveness[i] < MIN_BUTTONRESPONSIVENESS) // 50-10  //Fix for broken buttons. :)
         {
-            Settings.ButtonResponsiveness[i] = 40;
+            Settings.ButtonResponsiveness[i] = MIN_BUTTONRESPONSIVENESS;
             corrections++;
         }
         else
-        if(Settings.ButtonResponsiveness[i] > 130) // 110+20
+        if(Settings.ButtonResponsiveness[i] > MAX_BUTTONRESPONSIVENESS) // 110+20
         {
-            Settings.ButtonResponsiveness[i] = 130;
+            Settings.ButtonResponsiveness[i] = MAX_BUTTONRESPONSIVENESS;
             corrections++;
         }
     }