Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
760:21949c88da90 | 761:31883eacf1fa |
---|---|
1495 if(Settings.scubberActiveId > 1) | 1495 if(Settings.scubberActiveId > 1) |
1496 { | 1496 { |
1497 Settings.scubberActiveId = 0; | 1497 Settings.scubberActiveId = 0; |
1498 corrections++; | 1498 corrections++; |
1499 } | 1499 } |
1500 if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[0].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[0].TimerCur > MAX_SCRUBBER_TIME)) | 1500 if((Settings.scrubberData[0].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[0].TimerCur < MIN_SCRUBBER_TIME || Settings.scrubberData[0].TimerCur > (int16_t)MAX_SCRUBBER_TIME) |
1501 { | 1501 { |
1502 Settings.scrubberData[0].TimerMax = 0; | 1502 Settings.scrubberData[0].TimerMax = 0; |
1503 Settings.scrubberData[0].TimerCur = 0; | 1503 Settings.scrubberData[0].TimerCur = 0; |
1504 corrections++; | 1504 corrections++; |
1505 } | 1505 } |
1506 if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[1].TimerCur < MIN_SCRUBBER_TIME || (Settings.scrubberData[1].TimerCur > MAX_SCRUBBER_TIME)) | 1506 if((Settings.scrubberData[1].TimerMax > MAX_SCRUBBER_TIME) || Settings.scrubberData[1].TimerCur < MIN_SCRUBBER_TIME || Settings.scrubberData[1].TimerCur > (int16_t)MAX_SCRUBBER_TIME) |
1507 { | 1507 { |
1508 Settings.scrubberData[1].TimerMax = 0; | 1508 Settings.scrubberData[1].TimerMax = 0; |
1509 Settings.scrubberData[1].TimerCur = 0; | 1509 Settings.scrubberData[1].TimerCur = 0; |
1510 corrections++; | 1510 corrections++; |
1511 } | 1511 } |