Skip to content

Commit

Permalink
📺 Add to MKS UI About Screen (MarlinFirmware#24610)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb authored Aug 19, 2022
1 parent 03d9254 commit 6909f5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions Marlin/src/lcd/extui/mks_ui/draw_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

extern lv_group_t *g;
static lv_obj_t *scr;
static lv_obj_t *fw_type, *board;
static lv_obj_t *fw_type, *board, *website, *uuid, *protocol;

enum { ID_A_RETURN = 1 };

Expand All @@ -48,11 +48,20 @@ void lv_draw_about() {
scr = lv_screen_create(ABOUT_UI);
lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_A_RETURN);

fw_type = lv_label_create(scr, "Firmware: Marlin " SHORT_BUILD_VERSION);
lv_obj_align(fw_type, nullptr, LV_ALIGN_CENTER, 0, -20);
board = lv_label_create(scr, BOARD_INFO_NAME);
lv_obj_align(board, nullptr, LV_ALIGN_CENTER, 0, -80);

board = lv_label_create(scr, "Board: " BOARD_INFO_NAME);
lv_obj_align(board, nullptr, LV_ALIGN_CENTER, 0, -60);
fw_type = lv_label_create(scr, "Marlin " SHORT_BUILD_VERSION " (" STRING_DISTRIBUTION_DATE ")");
lv_obj_align(fw_type, nullptr, LV_ALIGN_CENTER, 0, -50);

website = lv_label_create(scr, WEBSITE_URL);
lv_obj_align(website, nullptr, LV_ALIGN_CENTER, 0, -20);

uuid = lv_label_create(scr, "UUID: " DEFAULT_MACHINE_UUID);
lv_obj_align(uuid, nullptr, LV_ALIGN_CENTER, 0, 10);

protocol = lv_label_create(scr, "Protocol: " PROTOCOL_VERSION);
lv_obj_align(protocol, nullptr, LV_ALIGN_CENTER, 0, 40);
}

void lv_clear_about() {
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define ALLOW_STM32DUINO
#include "env_validate.h"

#define BOARD_INFO_NAME "MKS Robin Nano"
#define BOARD_INFO_NAME "MKS Robin Nano V1"

//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
Expand Down

0 comments on commit 6909f5f

Please sign in to comment.