Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 92:be35821a4974 | 93:3d6ccfb0190b |
|---|---|
| 53 | 53 |
| 54 const SFirmwareData firmware_FirmwareData __attribute__( (section(".firmware_firmware_data")) ) = | 54 const SFirmwareData firmware_FirmwareData __attribute__( (section(".firmware_firmware_data")) ) = |
| 55 { | 55 { |
| 56 .versionFirst = 1, | 56 .versionFirst = 1, |
| 57 .versionSecond = 4, | 57 .versionSecond = 4, |
| 58 .versionThird = 6, | 58 .versionThird = 7, |
| 59 .versionBeta = 2, | 59 .versionBeta = 2, |
| 60 | 60 |
| 61 /* 4 bytes with trailing 0 */ | 61 /* 4 bytes with trailing 0 */ |
| 62 .signature = "mh", | 62 .signature = "mh", |
| 63 | 63 |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 /* uint8_t ButtonResponsiveness[4]; | 1045 /* uint8_t ButtonResponsiveness[4]; |
| 1046 */ | 1046 */ |
| 1047 // Base value, index 3 | 1047 // Base value, index 3 |
| 1048 if(Settings.ButtonResponsiveness[3] < 70) | 1048 if(Settings.ButtonResponsiveness[3] < MIN_BUTTONRESPONSIVENESS_GUI) |
| 1049 { | 1049 { |
| 1050 Settings.ButtonResponsiveness[3] = 70; | 1050 Settings.ButtonResponsiveness[3] = MIN_BUTTONRESPONSIVENESS_GUI; |
| 1051 corrections++; | 1051 corrections++; |
| 1052 } | 1052 } |
| 1053 else | 1053 else |
| 1054 if(Settings.ButtonResponsiveness[3] > 110) | 1054 if(Settings.ButtonResponsiveness[3] > MIN_BUTTONRESPONSIVENESS_GUI) |
| 1055 { | 1055 { |
| 1056 Settings.ButtonResponsiveness[3] = 130; | 1056 Settings.ButtonResponsiveness[3] = MIN_BUTTONRESPONSIVENESS; |
| 1057 corrections++; | 1057 corrections++; |
| 1058 } | 1058 } |
| 1059 // flex values 0, 1, 2 | 1059 // flex values 0, 1, 2 |
| 1060 for(int i=0; i<3;i++) | 1060 for(int i=0; i<3;i++) |
| 1061 { | 1061 { |
| 1062 if(Settings.ButtonResponsiveness[i] < 40) // 50-10 //Fix for broken buttons. :) | 1062 if(Settings.ButtonResponsiveness[i] < MIN_BUTTONRESPONSIVENESS) // 50-10 //Fix for broken buttons. :) |
| 1063 { | 1063 { |
| 1064 Settings.ButtonResponsiveness[i] = 40; | 1064 Settings.ButtonResponsiveness[i] = MIN_BUTTONRESPONSIVENESS; |
| 1065 corrections++; | 1065 corrections++; |
| 1066 } | 1066 } |
| 1067 else | 1067 else |
| 1068 if(Settings.ButtonResponsiveness[i] > 130) // 110+20 | 1068 if(Settings.ButtonResponsiveness[i] > MAX_BUTTONRESPONSIVENESS) // 110+20 |
| 1069 { | 1069 { |
| 1070 Settings.ButtonResponsiveness[i] = 130; | 1070 Settings.ButtonResponsiveness[i] = MAX_BUTTONRESPONSIVENESS; |
| 1071 corrections++; | 1071 corrections++; |
| 1072 } | 1072 } |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 /* uint8_t buttonBalance[3]; | 1075 /* uint8_t buttonBalance[3]; |
