diff --git a/src/display.cpp b/src/display.cpp index ca3f200..91736eb 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -20,6 +20,7 @@ const int Curses::log_sent_w_columns = 40; Curses::Curses() { initscr(); cbreak(); + start_color(); //noecho(); cmd_kbd = newwin(cmd_kbd_lines, cmd_kbd_columns, 0, 0); @@ -30,14 +31,16 @@ Curses::Curses() { cmd_speed = newwin(cmd_speed_lines, cmd_speed_columns, cmd_kbd_lines + get_lines, 0); - log_sent_w = newwin(log_sent_w_lines, log_sent_w_columns, - 0, cmd_kbd_columns + 1); - log_line_number = log_sent_w_lines - 1; + log_sent_title = newwin(1, log_sent_w_columns, + 0, cmd_kbd_columns + 1); + waddstr(log_sent_title, "SENT COMMANDS"); + wrefresh(log_sent_title); + log_sent_w = newwin(log_sent_w_lines - 1, log_sent_w_columns, + 1, cmd_kbd_columns + 1); + log_line_number = log_sent_w_lines - 2; wattron(log_sent_w, A_BOLD); - start_color(); init_pair(1, COLOR_RED, COLOR_BLACK); wattron(log_sent_w, COLOR_PAIR(1)); - scrollok(log_sent_w, TRUE); nav_data = newwin(nav_data_lines, nav_data_columns, @@ -54,6 +57,7 @@ Curses::~Curses() { delwin(cmd_kbd); delwin(cmd_speed); delwin(log_sent_w); + delwin(log_sent_title); delwin(nav_data); delwin(get); endwin(); diff --git a/src/keyboard_cmd.cpp b/src/keyboard_cmd.cpp index 4a35a37..1dc51cb 100644 --- a/src/keyboard_cmd.cpp +++ b/src/keyboard_cmd.cpp @@ -228,6 +228,10 @@ class Run break; } default : + { + cmd.publish(msg); + term->log_sent("hover !"); + } break; } // switch(c) loop_rate.sleep();