Rundungsfehlerkorrektur
This commit is contained in:
parent
21d69d24b6
commit
bb88c8d84d
8
main.c
8
main.c
@ -355,11 +355,19 @@ int main(void)
|
||||
if(leitungBenutzt)
|
||||
{
|
||||
int time = 3000 / NACHLAUF;
|
||||
int rest = 3000 % NACHLAUF;
|
||||
|
||||
uint8_t i = 0;
|
||||
for(i = 0; i < NACHLAUF; i++)
|
||||
{
|
||||
wait_sys_ms(time);
|
||||
|
||||
if(rest > 0)
|
||||
{
|
||||
wait_sys_ms(1);
|
||||
rest -= 1;
|
||||
}
|
||||
|
||||
nachlaufOffset += 1;
|
||||
setFuellstand(istWert + nachlaufOffset);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user