Skip to content

Commit

Permalink
Add proper target FW logo for each FW and resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-github committed Apr 20, 2024
1 parent 8c34f81 commit 3348a7c
Show file tree
Hide file tree
Showing 55 changed files with 1,299 additions and 63 deletions.
4 changes: 2 additions & 2 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ elseif(TARGET_FW_REPETIER)
elseif(TARGET_FW_SMOOTHIEWARE)
add_compile_options(-DTARGET_IS_SMOOTHIEWARE=1)
if(TFT_UI_SERVICE)
add_compile_options("-I${CMAKE_SOURCE_DIR}/main/display/3dprinter/smoothiware")
add_compile_options("-I${CMAKE_SOURCE_DIR}/main/display/3dprinter/smoothieware")
endif()
add_compile_options("-I${CMAKE_SOURCE_DIR}/main/target/3dprinter/smoothiware")
add_compile_options("-I${CMAKE_SOURCE_DIR}/main/target/3dprinter/smoothieware")
elseif(TARGET_FW_GRBL)
add_compile_options(-DTARGET_IS_GRBL=1)
if(TFT_UI_SERVICE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_MARLIN_LOGO
#define LV_ATTRIBUTE_IMG_MARLIN_LOGO
#ifndef LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#define LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LOGO uint8_t Marlin_Logo_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TARGET_FW_LOGO uint8_t target_fw_logo_map[] = {
0xfa, 0xfa, 0xfa, 0xff, /*Color of index 0*/
0x9a, 0x9a, 0x9a, 0xff, /*Color of index 1*/
0x61, 0x61, 0x61, 0xff, /*Color of index 2*/
Expand Down Expand Up @@ -44,12 +44,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LO
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf,
};

const lv_img_dsc_t Marlin_Logo = {
const lv_img_dsc_t target_fw_logo = {
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 80,
.header.h = 27,
.data_size = 556,
.data = Marlin_Logo_map,
.data = target_fw_logo_map,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_MARLIN_LOGO
#define LV_ATTRIBUTE_IMG_MARLIN_LOGO
#ifndef LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#define LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LOGO uint8_t Marlin_Logo_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TARGET_FW_LOGO uint8_t target_fw_logo_map[] = {
0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/
0x23, 0x23, 0x23, 0xff, /*Color of index 1*/
0x0a, 0x0a, 0x0a, 0xff, /*Color of index 2*/
Expand Down Expand Up @@ -52,12 +52,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LO
0xfe, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6f, 0xc0,
};

const lv_img_dsc_t Marlin_Logo = {
const lv_img_dsc_t target_fw_logo = {
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 105,
.header.h = 35,
.data_size = 961,
.data = Marlin_Logo_map,
.data = target_fw_logo_map,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_MARLIN_LOGO
#define LV_ATTRIBUTE_IMG_MARLIN_LOGO
#ifndef LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#define LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LOGO uint8_t Marlin_Logo_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TARGET_FW_LOGO uint8_t target_fw_logo_map[] = {
0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/
0x23, 0x23, 0x23, 0xff, /*Color of index 1*/
0x0a, 0x0a, 0x0a, 0xff, /*Color of index 2*/
Expand Down Expand Up @@ -52,12 +52,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LO
0xfe, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6f, 0xc0,
};

const lv_img_dsc_t Marlin_Logo = {
const lv_img_dsc_t target_fw_logo = {
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 105,
.header.h = 35,
.data_size = 961,
.data = Marlin_Logo_map,
.data = target_fw_logo_map,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_MARLIN_LOGO
#define LV_ATTRIBUTE_IMG_MARLIN_LOGO
#ifndef LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#define LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LOGO uint8_t Marlin_Logo_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TARGET_FW_LOGO uint8_t target_fw_logo_map[] = {
0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/
0x23, 0x23, 0x23, 0xff, /*Color of index 1*/
0x0a, 0x0a, 0x0a, 0xff, /*Color of index 2*/
Expand Down Expand Up @@ -52,12 +52,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MARLIN_LO
0xfe, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6f, 0xc0,
};

const lv_img_dsc_t Marlin_Logo = {
const lv_img_dsc_t target_fw_logo = {
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 105,
.header.h = 35,
.data_size = 961,
.data = Marlin_Logo_map,
.data = target_fw_logo_map,
};
4 changes: 2 additions & 2 deletions main/display/3dprinter/marlin/screens/splash_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

extern "C" lv_img_dsc_t *get_splash_logo();
extern "C" void release_splash_logo(lv_img_dsc_t *splash_logo);
LV_IMG_DECLARE(Marlin_Logo);
LV_IMG_DECLARE(target_fw_logo);

/**********************
* STATIC PROTOTYPES
Expand Down Expand Up @@ -86,7 +86,7 @@ void splash_screen() {

//Marlin Logo
lv_obj_t *logo_marlin = lv_img_create(ui_Screen);
lv_img_set_src(logo_marlin, &Marlin_Logo);
lv_img_set_src(logo_marlin, &target_fw_logo);
lv_obj_align(logo_marlin, LV_ALIGN_BOTTOM_LEFT, FW_LOGO_X, FW_LOGO_Y);

// Create version text object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@

#define CURRENT_SCROLL_BAR_WIDTH 10
#define CURRENT_SCROLL_BAR_RADIUS 5

#define FW_LOGO_X 1
#define FW_LOGO_Y -1
77 changes: 77 additions & 0 deletions main/display/3dprinter/repetier/res_320_240/target_fw_logo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#include "lvgl.h"

#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#define LV_ATTRIBUTE_IMG_TARGET_FW_LOGO
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_TARGET_FW_LOGO uint8_t target_fw_logo_map[] = {
0xe9, 0xe9, 0xe9, 0xff, /*Color of index 0*/
0x9e, 0x9e, 0x9e, 0xff, /*Color of index 1*/
0x5e, 0x5e, 0x5e, 0xff, /*Color of index 2*/
0x07, 0x07, 0x07, 0xff, /*Color of index 3*/

0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x46, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xfe, 0x40, 0x00, 0x17, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xe4, 0x00, 0x10, 0x01, 0xbf, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xb4, 0x00, 0x1b, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xe8, 0x00, 0x1f, 0xff, 0x40, 0x05, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xf4, 0x00, 0x1f, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xf9, 0x00, 0x17, 0xff, 0xff, 0xfe, 0x00, 0x06, 0xff, 0xff, 0xf0,
0xff, 0xff, 0x90, 0x00, 0x79, 0x7f, 0xff, 0x93, 0xe4, 0x00, 0x6f, 0xff, 0xf0,
0xff, 0xfe, 0x00, 0x06, 0xf4, 0x1b, 0xfd, 0x07, 0xf9, 0x00, 0x07, 0xff, 0xf0,
0xff, 0xe4, 0x00, 0x6f, 0xf8, 0x01, 0xe0, 0x03, 0xff, 0xd0, 0x01, 0xbf, 0xf0,
0xfe, 0x00, 0x06, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xf8, 0x00, 0x1b, 0xf0,
0xfc, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0x50, 0x03, 0xf0,
0xf8, 0x01, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0xe4, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0xfe, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xff, 0xf8, 0x01, 0x90, 0x03, 0xff, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0xfe, 0x41, 0xf0,
0xf4, 0x0b, 0xff, 0xff, 0xf4, 0x00, 0x90, 0x07, 0xff, 0xff, 0xfe, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0xff, 0xf8, 0x01, 0x90, 0x03, 0xff, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x03, 0xff, 0xff, 0xfe, 0x01, 0xf0,
0xf4, 0x1b, 0xff, 0xff, 0xf8, 0x00, 0x90, 0x07, 0xff, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0xff, 0xe6, 0x80, 0x90, 0x19, 0xbf, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xff, 0x41, 0x69, 0x95, 0xe4, 0x1f, 0xff, 0xff, 0x01, 0xf0,
0xf4, 0x0f, 0xff, 0xf8, 0x00, 0x07, 0xe9, 0x00, 0x06, 0xff, 0xfe, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0x50, 0x00, 0x0b, 0x79, 0x00, 0x00, 0x6f, 0xff, 0x01, 0xf0,
0xf4, 0x0f, 0xf9, 0x00, 0x00, 0x68, 0x06, 0x40, 0x00, 0x06, 0xfe, 0x41, 0xf0,
0xf4, 0x0f, 0x90, 0x00, 0x02, 0x90, 0x01, 0xa0, 0x00, 0x01, 0x6e, 0x01, 0xf0,
0xf4, 0x09, 0x00, 0x00, 0x19, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x0b, 0x01, 0xf0,
0xf4, 0x04, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x02, 0x80, 0x00, 0x03, 0x01, 0xf0,
0xf4, 0x0e, 0x40, 0x0a, 0x40, 0x00, 0x00, 0x00, 0x68, 0x00, 0x0b, 0x01, 0xf0,
0xf4, 0x0b, 0xd0, 0x64, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x41, 0xbf, 0x01, 0xf0,
0xf4, 0x0f, 0xfd, 0x90, 0x00, 0x00, 0x40, 0x00, 0x01, 0x97, 0xfe, 0x01, 0xf0,
0xf4, 0x1b, 0xff, 0x00, 0x00, 0x06, 0xf4, 0x00, 0x00, 0x1f, 0xff, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0x00, 0x00, 0x5f, 0xfe, 0x40, 0x00, 0x1f, 0xff, 0x01, 0xf0,
0xf4, 0x0b, 0xff, 0x00, 0x01, 0xff, 0xff, 0xe4, 0x00, 0x1f, 0xfe, 0x01, 0xf0,
0xf8, 0x02, 0xbe, 0x00, 0x1f, 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xf4, 0x02, 0xf0,
0xfc, 0x00, 0x6f, 0x01, 0xbf, 0xff, 0xff, 0xff, 0xd0, 0x1f, 0x50, 0x06, 0xf0,
0xfe, 0x40, 0x06, 0x4b, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x19, 0x00, 0x0b, 0xf0,
0xff, 0xe0, 0x00, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0x00, 0xbf, 0xf0,
0xff, 0xfa, 0x00, 0x0b, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x40, 0x07, 0xff, 0xf0,
0xff, 0xff, 0x90, 0x01, 0xbf, 0xff, 0xff, 0xff, 0xd4, 0x00, 0x6f, 0xff, 0xf0,
0xff, 0xff, 0xf9, 0x00, 0x0b, 0xff, 0xff, 0xfe, 0x40, 0x02, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfe, 0x40, 0x01, 0xff, 0xff, 0xf4, 0x00, 0x2b, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf5, 0x00, 0x1f, 0xff, 0x50, 0x01, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xfe, 0x40, 0x01, 0xf9, 0x00, 0x1b, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x40, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0b, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x00, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
};

const lv_img_dsc_t target_fw_logo = {
.header.cf = LV_IMG_CF_INDEXED_2BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 50,
.data_size = 666,
.data = target_fw_logo_map,
};
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@

#define CURRENT_SCROLL_BAR_WIDTH 10
#define CURRENT_SCROLL_BAR_RADIUS 5

#define FW_LOGO_X 10
#define FW_LOGO_Y -1
Loading

0 comments on commit 3348a7c

Please sign in to comment.