2015-05-01 22:40:28 +00:00
|
|
|
#ifndef CURSES_DISPLAY
|
|
|
|
#define CURSES_DISPLAY
|
2015-05-01 19:23:00 +00:00
|
|
|
|
|
|
|
#include <ncurses.h>
|
2015-05-02 13:37:58 +00:00
|
|
|
#include <string>
|
2015-05-01 19:23:00 +00:00
|
|
|
|
|
|
|
class Curses
|
|
|
|
{
|
|
|
|
private:
|
2015-05-02 13:37:58 +00:00
|
|
|
static const int cmd_kbd_lines;
|
|
|
|
static const int cmd_kbd_columns;
|
|
|
|
WINDOW* cmd_kbd;
|
2015-05-02 17:24:54 +00:00
|
|
|
void print_cmd_kbd();
|
|
|
|
|
2015-05-02 13:37:58 +00:00
|
|
|
static const int cmd_speed_lines;
|
|
|
|
static const int cmd_speed_columns;
|
|
|
|
WINDOW* cmd_speed;
|
|
|
|
void print_cmd_speed();
|
2015-05-02 17:24:54 +00:00
|
|
|
|
|
|
|
static const int get_lines;
|
|
|
|
static const int get_columns;
|
2015-05-01 22:00:28 +00:00
|
|
|
WINDOW* get;
|
2015-05-01 22:40:28 +00:00
|
|
|
|
2015-05-02 17:24:54 +00:00
|
|
|
static const int log_sent_w_lines;
|
|
|
|
static const int log_sent_w_columns;
|
|
|
|
int log_line_number;
|
2015-05-01 22:40:28 +00:00
|
|
|
WINDOW* log_sent_w;
|
2015-05-02 17:46:02 +00:00
|
|
|
WINDOW* log_sent_title;
|
2015-05-02 17:24:54 +00:00
|
|
|
|
|
|
|
static const int nav_data_lines;
|
|
|
|
static const int nav_data_columns;
|
2015-05-01 22:40:28 +00:00
|
|
|
WINDOW* nav_data;
|
2015-05-01 19:23:00 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
Curses();
|
|
|
|
~Curses();
|
2015-05-01 22:00:28 +00:00
|
|
|
char getchar();
|
2015-05-01 22:40:28 +00:00
|
|
|
|
|
|
|
// TODO
|
2015-05-02 13:37:58 +00:00
|
|
|
void update_cmd_speed(const char& coord, const float& v);
|
|
|
|
void update_navdata(const float& batteryPercent,
|
|
|
|
const int& state,
|
|
|
|
const float& time);
|
|
|
|
void log_sent(const std::string& str);
|
2015-05-01 19:23:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|