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;
|
|
|
|
static const int cmd_speed_lines;
|
|
|
|
static const int cmd_speed_columns;
|
|
|
|
WINDOW* cmd_speed;
|
|
|
|
void print_cmd_kbd();
|
|
|
|
void print_cmd_speed();
|
2015-05-01 22:00:28 +00:00
|
|
|
WINDOW* get;
|
2015-05-01 22:40:28 +00:00
|
|
|
|
|
|
|
// TODO (avec scroll)
|
|
|
|
WINDOW* log_sent_w;
|
|
|
|
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
|