TR-mbed 1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
UI Class Reference

#include <ui_g.h>

Public Member Functions

 UI (uint16_t robot_id, std::function< void(uint8_t *, uint16_t)> send_func)
 Sets up robot id and sending function.
 
void ui_init_g ()
 Setup up all figures & strings.
 
void ui_reinit_g ()
 
void ui_update_g ()
 Checks what figures/strings has been updated and only sends those that have changes to the server.
 
void set_spin_ui (bool is_spinning)
 
void set_flywheel_ui (bool is_flywheel_on)
 
void set_cv_ui (bool is_cv_on)
 
void set_alignment_ui (bool is_aligned)
 

Public Attributes

uint8_t ui_g_max_send_count [TOTAL_FIGURE+TOTAL_STRING]
 
ui_interface_figure_t ui_g_now_figures [TOTAL_FIGURE]
 
uint8_t ui_g_dirty_figure [TOTAL_FIGURE]
 
ui_interface_string_t ui_g_now_strings [TOTAL_STRING]
 
uint8_t ui_g_dirty_string [TOTAL_STRING]
 
uint16_t ui_self_id
 

Static Public Attributes

static const int TOTAL_FIGURE = 0
 
static const int TOTAL_STRING = 4
 

Constructor & Destructor Documentation

◆ UI()

UI::UI ( uint16_t  robot_id,
std::function< void(uint8_t *, uint16_t)>  send_func 
)

Sets up robot id and sending function.

Parameters
robot_idis the robot id to send the UI to
send_funcis the function used to send the data

Member Function Documentation

◆ set_alignment_ui()

void UI::set_alignment_ui ( bool  is_aligned)

◆ set_cv_ui()

void UI::set_cv_ui ( bool  is_cv_on)

◆ set_flywheel_ui()

void UI::set_flywheel_ui ( bool  is_flywheel_on)

◆ set_spin_ui()

void UI::set_spin_ui ( bool  is_spinning)

◆ ui_init_g()

void UI::ui_init_g ( )

Setup up all figures & strings.

◆ ui_reinit_g()

void UI::ui_reinit_g ( )

Tells server to re-add stuff

◆ ui_update_g()

void UI::ui_update_g ( )

Checks what figures/strings has been updated and only sends those that have changes to the server.

Member Data Documentation

◆ TOTAL_FIGURE

const int UI::TOTAL_FIGURE = 0
static

◆ TOTAL_STRING

const int UI::TOTAL_STRING = 4
static

◆ ui_g_dirty_figure

uint8_t UI::ui_g_dirty_figure[TOTAL_FIGURE]

◆ ui_g_dirty_string

uint8_t UI::ui_g_dirty_string[TOTAL_STRING]

◆ ui_g_max_send_count

uint8_t UI::ui_g_max_send_count[TOTAL_FIGURE+TOTAL_STRING]
Initial value:
= {
5,
5,
5,
5,
}

◆ ui_g_now_figures

ui_interface_figure_t UI::ui_g_now_figures[TOTAL_FIGURE]

◆ ui_g_now_strings

ui_interface_string_t UI::ui_g_now_strings[TOTAL_STRING]

◆ ui_self_id

uint16_t UI::ui_self_id

The documentation for this class was generated from the following files: