Skip to content

Commit

Permalink
feat: simple arrows bitmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Otrebor671 committed Sep 13, 2024
1 parent c2b6023 commit 5efa284
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions firmware/main/general/bitmaps_general.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ static const unsigned char epd_bitmap_arrow_down[] = {
0x80, 0x01, 0x80, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0x3f, 0xfc,
0x1f, 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80};

static const unsigned char* arrows_bitmap_arr[] = {
epd_bitmap_arrow_left, epd_bitmap_arrow_right, epd_bitmap_arrow_up,
epd_bitmap_arrow_down};
// simple_left_arrow 8x8
static const unsigned char simple_left_arrow_bmp[] = {0x08, 0x10, 0x20, 0x40,
0x40, 0x20, 0x10, 0x08};
// simple_right_arrow 8x8
static const unsigned char simple_right_arrow_bmp[] = {0x10, 0x08, 0x04, 0x02,
0x02, 0x04, 0x08, 0x10};
// simple_up_arrow 8x8
static const unsigned char simple_up_arrow_bmp[] = {0x00, 0x18, 0x24, 0x42,
0x81, 0x00, 0x00, 0x00};
// simple_down_arrow 8x8
static const unsigned char simple_down_arrow_bmp[] = {0x00, 0x00, 0x00, 0x81,
0x42, 0x24, 0x18, 0x00};

unsigned char* epd_startup_logo[] = {epd_bitmap_minino_text_logo,
epd_bitmap_face_logo};

Expand Down
5 changes: 5 additions & 0 deletions firmware/main/modules/menus_module/menus_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ void menus_module_restart() {
esp_restart();
}

void menus_module_reset() {
preferences_put_int("MENUNUMBER", menus_ctx->parent_menu_idx);
esp_restart();
}

void menus_module_exit_app() {
menus_module_set_app_state(false, menus_input_cb);
screen_saver_get_idle_state();
Expand Down
3 changes: 2 additions & 1 deletion firmware/main/modules/menus_module/menus_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ void menus_module_set_reset_screen(menu_idx_t menu);
void menus_module_set_menu(menu_idx_t menu_idx);
void menus_module_hide_menu(menu_idx_t menu_idx);
void menus_module_reveal_menu(menu_idx_t menu_idx);
void menus_module_refresh();
void menus_module_refresh();
void menus_module_reset();

0 comments on commit 5efa284

Please sign in to comment.