Mercurial > public > ostc4
changeset 93:3d6ccfb0190b kittz
a bit of
author | Dmitry Romanov <kitt@bk.ru> |
---|---|
date | Mon, 26 Nov 2018 11:38:06 +0300 |
parents | be35821a4974 |
children | c6d284ea265b |
files | Discovery/Inc/global_constants.h Discovery/Src/settings.c ostc4pack/OSTC4_Firmware.bin ostc4pack/OSTC4_firmware_upload.bin |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Inc/global_constants.h Mon Nov 26 10:50:39 2018 +0300 +++ b/Discovery/Inc/global_constants.h Mon Nov 26 11:38:06 2018 +0300 @@ -30,7 +30,7 @@ #define DEFAULT_BUTTONRESPONSIVENESS_GUI 90 #define MIN_BUTTONRESPONSIVENESS_GUI 50 //50 (-10correction) #define MAX_BUTTONRESPONSIVENESS_GUI 110//100 (+10correction) -#define MIN_BUTTONRESPONSIVENESS MIN_BUTTONRESPONSIVENESS_GUI-10 //MIN_BUTTONRESPONSIVENESS_GUI-10 correction -#define MAX_BUTTONRESPONSIVENESS MAX_BUTTONRESPONSIVENESS_GUI+10//MIN_BUTTONRESPONSIVENESS_GUI+10correction +#define MIN_BUTTONRESPONSIVENESS MIN_BUTTONRESPONSIVENESS_GUI-20 //MIN_BUTTONRESPONSIVENESS_GUI-10 correction +#define MAX_BUTTONRESPONSIVENESS MAX_BUTTONRESPONSIVENESS_GUI+20//MIN_BUTTONRESPONSIVENESS_GUI+10correction #endif
--- 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++; } }