Mercurial > public > ostc4
diff Discovery/Src/settings.c @ 761:31883eacf1fa
Fix/handle negative scrubber timer values
author | heinrichsweikamp |
---|---|
date | Tue, 21 Mar 2023 12:57:37 +0100 |
parents | b6d8a6fbf4fd |
children | 32529dfea3b0 |
line wrap: on
line diff
--- a/Discovery/Src/settings.c Tue Mar 21 12:56:54 2023 +0100 +++ b/Discovery/Src/settings.c Tue Mar 21 12:57:37 2023 +0100 @@ -1497,13 +1497,13 @@ Settings.scubberActiveId = 0; corrections++; } - if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[0].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[0].TimerCur > MAX_SCRUBBER_TIME)) + if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[0].TimerCur < MIN_SCRUBBER_TIME || Settings.scrubberData[0].TimerCur > (int16_t)MAX_SCRUBBER_TIME) { Settings.scrubberData[0].TimerMax = 0; Settings.scrubberData[0].TimerCur = 0; corrections++; } - if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[1].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[1].TimerCur > MAX_SCRUBBER_TIME)) + if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[1].TimerCur < MIN_SCRUBBER_TIME || Settings.scrubberData[1].TimerCur > (int16_t)MAX_SCRUBBER_TIME) { Settings.scrubberData[1].TimerMax = 0; Settings.scrubberData[1].TimerCur = 0;