set now in main at the top
This commit is contained in:
parent
85075c1efb
commit
d65f4a3baa
@ -704,6 +704,7 @@ int main(int argc, char **argv) {
|
||||
bat_state.previous_ms = now;
|
||||
|
||||
while(1) {
|
||||
now = now_ms();
|
||||
ch = tolower(getch());
|
||||
switch (ch) {
|
||||
case 'q' :
|
||||
@ -719,8 +720,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!is_receiver) calc_data(&tel, &bat_state, now);
|
||||
now = now_ms();
|
||||
|
||||
if (now - t100 >= 100 * delay) {
|
||||
win_int(&tel.speed, use_color);
|
||||
win_int(&tel.rpm, use_color);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user