fixed screen (first line) issue when in the interactive mode (#116)
This commit is contained in:
parent
db53a09dbf
commit
9c2531a98d
|
|
@ -137,6 +137,7 @@ void interactiveNoConnection(void) {
|
||||||
void interactiveShowData(void) {
|
void interactiveShowData(void) {
|
||||||
struct aircraft *a = Modes.aircrafts;
|
struct aircraft *a = Modes.aircrafts;
|
||||||
static uint64_t next_update;
|
static uint64_t next_update;
|
||||||
|
static bool need_clear = true;
|
||||||
uint64_t now = mstime();
|
uint64_t now = mstime();
|
||||||
char progress;
|
char progress;
|
||||||
char spinner[4] = "|/-\\";
|
char spinner[4] = "|/-\\";
|
||||||
|
|
@ -149,6 +150,10 @@ void interactiveShowData(void) {
|
||||||
if (!Modes.interactive)
|
if (!Modes.interactive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (need_clear) {
|
||||||
|
clear();
|
||||||
|
need_clear = false;
|
||||||
|
}
|
||||||
// Refresh screen every (MODES_INTERACTIVE_REFRESH_TIME) miliseconde
|
// Refresh screen every (MODES_INTERACTIVE_REFRESH_TIME) miliseconde
|
||||||
if (now < next_update)
|
if (now < next_update)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue