Registration of badges and receiving votes only of voting badges implemented.
This commit is contained in:
@@ -620,7 +620,8 @@
|
||||
|
||||
/*File system interfaces for common APIs */
|
||||
|
||||
/*API for fopen, fread, etc*/
|
||||
|
||||
/*API for fopen, fread, etc */
|
||||
#define LV_USE_FS_STDIO 0
|
||||
#if LV_USE_FS_STDIO
|
||||
#define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
|
||||
@@ -676,6 +676,30 @@ void tick_screen_ibvs_processor() {
|
||||
}
|
||||
}
|
||||
|
||||
void create_screen_not_authorized() {
|
||||
lv_obj_t *obj = lv_obj_create(0);
|
||||
objects.not_authorized = obj;
|
||||
lv_obj_set_pos(obj, 0, 0);
|
||||
lv_obj_set_size(obj, 320, 240);
|
||||
lv_obj_set_style_bg_color(obj, lv_color_hex(0xff7e2929), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
{
|
||||
lv_obj_t *parent_obj = obj;
|
||||
{
|
||||
lv_obj_t *obj = lv_label_create(parent_obj);
|
||||
lv_obj_set_pos(obj, 26, 97);
|
||||
lv_obj_set_size(obj, 268, 47);
|
||||
lv_label_set_long_mode(obj, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_style_text_font(obj, &lv_font_montserrat_24, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_label_set_text(obj, "This Badge is no authorized in this voting session !!!");
|
||||
}
|
||||
}
|
||||
|
||||
tick_screen_not_authorized();
|
||||
}
|
||||
|
||||
void tick_screen_not_authorized() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef void (*tick_screen_func_t)();
|
||||
@@ -688,6 +712,7 @@ tick_screen_func_t tick_screen_funcs[] = {
|
||||
tick_screen_vote_results,
|
||||
tick_screen_ibvs_mode,
|
||||
tick_screen_ibvs_processor,
|
||||
tick_screen_not_authorized,
|
||||
};
|
||||
void tick_screen(int screen_index) {
|
||||
tick_screen_funcs[screen_index]();
|
||||
@@ -709,4 +734,5 @@ void create_screens() {
|
||||
create_screen_vote_results();
|
||||
create_screen_ibvs_mode();
|
||||
create_screen_ibvs_processor();
|
||||
create_screen_not_authorized();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef struct _objects_t {
|
||||
lv_obj_t *vote_results;
|
||||
lv_obj_t *ibvs_mode;
|
||||
lv_obj_t *ibvs_processor;
|
||||
lv_obj_t *not_authorized;
|
||||
lv_obj_t *obj0;
|
||||
lv_obj_t *obj1;
|
||||
lv_obj_t *obj2;
|
||||
@@ -50,6 +51,7 @@ enum ScreensEnum {
|
||||
SCREEN_ID_VOTE_RESULTS = 6,
|
||||
SCREEN_ID_IBVS_MODE = 7,
|
||||
SCREEN_ID_IBVS_PROCESSOR = 8,
|
||||
SCREEN_ID_NOT_AUTHORIZED = 9,
|
||||
};
|
||||
|
||||
void create_screen_start();
|
||||
@@ -75,6 +77,9 @@ void tick_screen_ibvs_mode();
|
||||
|
||||
void create_screen_ibvs_processor();
|
||||
void tick_screen_ibvs_processor();
|
||||
|
||||
void create_screen_not_authorized();
|
||||
void tick_screen_not_authorized();
|
||||
|
||||
void tick_screen_by_id(enum ScreensEnum screenId);
|
||||
void tick_screen(int screen_index);
|
||||
|
||||
Reference in New Issue
Block a user