main.c aktualisiert
This commit is contained in:
parent
a706146744
commit
89625f8966
9
main.c
9
main.c
@ -278,7 +278,7 @@ uint8_t toPercent(uint8_t value, uint8_t max)
|
|||||||
return (value * 100 + max / 2) / max;
|
return (value * 100 + max / 2) / max;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFuellstand(uint8_t value) // setzt Füllstand Text über progress bar
|
void setFuellstand(uint8_t value)
|
||||||
{
|
{
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ void setFuellstand(uint8_t value) // setzt Füllstand Text über progress bar
|
|||||||
fuellstand(toPercent(value, 255));
|
fuellstand(toPercent(value, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
int SwitchesToInt(void) // DIL Leiste zu Int
|
int SwitchesToInt(void)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
@ -298,12 +298,11 @@ int SwitchesToInt(void) // DIL Leiste zu Int
|
|||||||
if (!*Switch[i])
|
if (!*Switch[i])
|
||||||
{
|
{
|
||||||
result |= (1 << i);
|
result |= (1 << i);
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
PortConfig();
|
PortConfig();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user