diff --git a/src/main.c b/src/main.c index 0507fcc..67c90be 100644 --- a/src/main.c +++ b/src/main.c @@ -18,7 +18,6 @@ #include "wren_utils.h" static int tick_ctr = 0; -static int cycle_ctr = 0; static int shift_state = 0; static int alpha_state = 0; static int off_state = 0; @@ -180,7 +179,7 @@ int main(int isappli, int optnum) { tick_ctr++; if (must_redraw) { - set_statusbar(tick_ctr, cycle_ctr, shift_state, alpha_state, get_battery_voltage()); + set_statusbar(tick_ctr, shift_state, alpha_state, get_battery_voltage()); set_menubar(); dclear(C_BLACK); @@ -203,7 +202,6 @@ int main(int isappli, int optnum) { if (ret == 0) { // pause timer during sheduler operations, we restart it before resuming a job timer_pause(timer_sched); - cycle_ctr++; // resume job timer_start(timer_sched); @@ -224,7 +222,7 @@ int main(int isappli, int optnum) { term_eprint("SCHEDULER EXIT"); - set_statusbar(tick_ctr, cycle_ctr, shift_state, alpha_state, get_battery_voltage()); + set_statusbar(tick_ctr, shift_state, alpha_state, get_battery_voltage()); set_menubar(); dclear(C_BLACK); diff --git a/src/ui.c b/src/ui.c index 6366948..040fa90 100644 --- a/src/ui.c +++ b/src/ui.c @@ -14,7 +14,7 @@ static void date_str(char *buf) { sprintf(buf, "%04d-%02d-%02d %02d:%02d:%02d", t.year, t.month, t.week_day, t.hours, t.minutes, t.seconds); } -void set_statusbar(int tick_ctr, int cycle_ctr, int shift_state, int alpha_state, int battery) { +void set_statusbar(int tick_ctr, int shift_state, int alpha_state, int battery) { // set green bar for (int i = 0; i < UNS_TERM_COLS; i++) term_writeat(0, i, C_NONE, C_GREEN, " "); @@ -27,8 +27,7 @@ void set_statusbar(int tick_ctr, int cycle_ctr, int shift_state, int alpha_state // then add actutal text char statusbar[UNS_TERM_COLS + 1]; - sprintf(statusbar, "%s%s t=%dk c=%d bat=%.2fV %s", shift_symbol, alpha_symbol, tick_ctr / 1000, cycle_ctr, - (float)battery / 100, now); + sprintf(statusbar, "%s%s t=%d bat=%.2fV %s", shift_symbol, alpha_symbol, tick_ctr, (float)battery / 100, now); term_writeat(0, 0, C_BLACK, C_GREEN, statusbar); } diff --git a/src/ui.h b/src/ui.h index ac60127..639c36d 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,7 +1,7 @@ #ifndef UNS_UI_H #define UNS_UI_H -void set_statusbar(int tick_ctr, int cycle_ctr, int shift_state, int alpha_state, int battery); +void set_statusbar(int tick_ctr, int shift_state, int alpha_state, int battery); extern char fnkeys[6][11]; void set_menubar(void);