Merge pull request #15040 from s-hadinger/lvgl_splash

LVGL Splash screen and ``SetOption135 1`` to disable splash screen
This commit is contained in:
s-hadinger 2022-03-05 23:15:58 +01:00 committed by GitHub
commit 16f0adec14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 1842 additions and 1185 deletions

View File

@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
- NeoPool commands ``NPpHMin``, ``NPpHMax``, ``NPpH``, ``NPRedox``, ``NPHydrolysis``, ``NPIonization``, ``NPChlorine`` and ``NPControl`` (#15015)
- NeoPool system voltages display
- Full DS3231 integration and synchronisation when using UBX (=GPS), NTP or manual time
- LVGL Splash screen and ``SetOption135 1`` to disable splash screen
### Changed
- Extent number of pulsetimers from 8 to 32 (#8266)

View File

@ -1,5 +1,7 @@
extern const bcstring be_const_str_;
extern const bcstring be_const_str_AES_GCM;
extern const bcstring be_const_str_ALIGN_BOTTOM_MID;
extern const bcstring be_const_str_ALIGN_LEFT_MID;
extern const bcstring be_const_str_AXP192;
extern const bcstring be_const_str_Animate_X20pc_X20is_X20out_X20of_X20range;
extern const bcstring be_const_str_AudioFileSource;
@ -98,6 +100,7 @@ extern const bcstring be_const_str_SERIAL_8O2;
extern const bcstring be_const_str_SK6812_GRBW;
extern const bcstring be_const_str_STATE_DEFAULT;
extern const bcstring be_const_str_TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27;
extern const bcstring be_const_str_TASMOTA;
extern const bcstring be_const_str_Tasmota;
extern const bcstring be_const_str_Tele;
extern const bcstring be_const_str_Trigger;
@ -220,6 +223,7 @@ extern const bcstring be_const_str__request_from;
extern const bcstring be_const_str__rules;
extern const bcstring be_const_str__settings_def;
extern const bcstring be_const_str__settings_ptr;
extern const bcstring be_const_str__splash;
extern const bcstring be_const_str__t;
extern const bcstring be_const_str__timers;
extern const bcstring be_const_str__write;
@ -348,6 +352,7 @@ extern const bcstring be_const_str_decrypt;
extern const bcstring be_const_str_def;
extern const bcstring be_const_str_deg;
extern const bcstring be_const_str_deinit;
extern const bcstring be_const_str_del;
extern const bcstring be_const_str_delay;
extern const bcstring be_const_str_delete_all_configs;
extern const bcstring be_const_str_depower;
@ -357,6 +362,7 @@ extern const bcstring be_const_str_detect;
extern const bcstring be_const_str_detected_X20on_X20bus;
extern const bcstring be_const_str_digital_read;
extern const bcstring be_const_str_digital_write;
extern const bcstring be_const_str_dim;
extern const bcstring be_const_str_dimmer;
extern const bcstring be_const_str_dirty;
extern const bcstring be_const_str_discover;
@ -443,6 +449,7 @@ extern const bcstring be_const_str_get_current_module_name;
extern const bcstring be_const_str_get_current_module_path;
extern const bcstring be_const_str_get_free_heap;
extern const bcstring be_const_str_get_height;
extern const bcstring be_const_str_get_hor_res;
extern const bcstring be_const_str_get_input_power_status;
extern const bcstring be_const_str_get_light;
extern const bcstring be_const_str_get_log;
@ -486,6 +493,7 @@ extern const bcstring be_const_str_id;
extern const bcstring be_const_str_id_X20must_X20be_X20of_X20type_X20_X27int_X27;
extern const bcstring be_const_str_if;
extern const bcstring be_const_str_imax;
extern const bcstring be_const_str_img;
extern const bcstring be_const_str_imin;
extern const bcstring be_const_str_import;
extern const bcstring be_const_str_init;
@ -524,6 +532,7 @@ extern const bcstring be_const_str_json_fdump_map;
extern const bcstring be_const_str_k;
extern const bcstring be_const_str_keys;
extern const bcstring be_const_str_kv;
extern const bcstring be_const_str_label;
extern const bcstring be_const_str_last_modified;
extern const bcstring be_const_str_leds;
extern const bcstring be_const_str_length_X20in_X20bits_X20must_X20be_X20between_X200_X20and_X2032;
@ -590,6 +599,7 @@ extern const bcstring be_const_str_now;
extern const bcstring be_const_str_null_cb;
extern const bcstring be_const_str_number;
extern const bcstring be_const_str_o;
extern const bcstring be_const_str_obj;
extern const bcstring be_const_str_obj_class_create_obj;
extern const bcstring be_const_str_obj_event_base;
extern const bcstring be_const_str_offset;
@ -608,6 +618,7 @@ extern const bcstring be_const_str_path;
extern const bcstring be_const_str_pc;
extern const bcstring be_const_str_pc_abs;
extern const bcstring be_const_str_pc_rel;
extern const bcstring be_const_str_pct;
extern const bcstring be_const_str_percentage;
extern const bcstring be_const_str_persist;
extern const bcstring be_const_str_persist_X2E_p_X20is_X20not_X20a_X20map;
@ -650,6 +661,8 @@ extern const bcstring be_const_str_readline;
extern const bcstring be_const_str_real;
extern const bcstring be_const_str_reapply;
extern const bcstring be_const_str_redirect;
extern const bcstring be_const_str_refr_now;
extern const bcstring be_const_str_refr_pos;
extern const bcstring be_const_str_refr_size;
extern const bcstring be_const_str_register_button_encoder;
extern const bcstring be_const_str_register_obj;
@ -692,6 +705,7 @@ extern const bcstring be_const_str_save;
extern const bcstring be_const_str_save_before_restart;
extern const bcstring be_const_str_scale_uint;
extern const bcstring be_const_str_scan;
extern const bcstring be_const_str_scr_act;
extern const bcstring be_const_str_screenshot;
extern const bcstring be_const_str_search;
extern const bcstring be_const_str_sec;
@ -701,6 +715,7 @@ extern const bcstring be_const_str_send;
extern const bcstring be_const_str_send_multicast;
extern const bcstring be_const_str_serial;
extern const bcstring be_const_str_set;
extern const bcstring be_const_str_set_align;
extern const bcstring be_const_str_set_alternate;
extern const bcstring be_const_str_set_auth;
extern const bcstring be_const_str_set_bits_per_sample;
@ -729,19 +744,29 @@ extern const bcstring be_const_str_set_pwm;
extern const bcstring be_const_str_set_rate;
extern const bcstring be_const_str_set_reachable;
extern const bcstring be_const_str_set_rgb;
extern const bcstring be_const_str_set_size;
extern const bcstring be_const_str_set_style_bg_color;
extern const bcstring be_const_str_set_style_border_width;
extern const bcstring be_const_str_set_style_img_recolor;
extern const bcstring be_const_str_set_style_img_recolor_opa;
extern const bcstring be_const_str_set_style_line_color;
extern const bcstring be_const_str_set_style_pad_all;
extern const bcstring be_const_str_set_style_pad_right;
extern const bcstring be_const_str_set_style_radius;
extern const bcstring be_const_str_set_style_text_color;
extern const bcstring be_const_str_set_style_text_font;
extern const bcstring be_const_str_set_tasmota_logo;
extern const bcstring be_const_str_set_text;
extern const bcstring be_const_str_set_time;
extern const bcstring be_const_str_set_timeouts;
extern const bcstring be_const_str_set_timer;
extern const bcstring be_const_str_set_user_data;
extern const bcstring be_const_str_set_useragent;
extern const bcstring be_const_str_set_width;
extern const bcstring be_const_str_set_x;
extern const bcstring be_const_str_set_xy;
extern const bcstring be_const_str_set_y;
extern const bcstring be_const_str_set_zoom;
extern const bcstring be_const_str_setbits;
extern const bcstring be_const_str_seti;
extern const bcstring be_const_str_setitem;
@ -758,10 +783,14 @@ extern const bcstring be_const_str_sinh;
extern const bcstring be_const_str_size;
extern const bcstring be_const_str_skip;
extern const bcstring be_const_str_solidified;
extern const bcstring be_const_str_splash;
extern const bcstring be_const_str_splash_init;
extern const bcstring be_const_str_splash_remove;
extern const bcstring be_const_str_split;
extern const bcstring be_const_str_sqrt;
extern const bcstring be_const_str_srand;
extern const bcstring be_const_str_start;
extern const bcstring be_const_str_started;
extern const bcstring be_const_str_state;
extern const bcstring be_const_str_static;
extern const bcstring be_const_str_stop;

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,16 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_libdisplay_map) {
{ be_const_key(touch_update, -1), be_const_ctype_func(be_ntv_display_touch_update) },
{ be_const_key(driver_name, 2), be_const_ctype_func(be_ntv_display_driver_name) },
{ be_const_key(start, -1), be_const_func(be_ntv_display_start) },
{ be_const_key(started, 0), be_const_ctype_func(be_ntv_display_started) },
{ be_const_key(driver_name, -1), be_const_ctype_func(be_ntv_display_driver_name) },
{ be_const_key(touch_update, 2), be_const_ctype_func(be_ntv_display_touch_update) },
{ be_const_key(dimmer, -1), be_const_func(be_ntv_display_dimmer) },
{ be_const_key(start, 1), be_const_func(be_ntv_display_start) },
};
static be_define_const_map(
m_libdisplay_map,
4
5
);
static be_define_const_module(

View File

@ -1,21 +1,24 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_liblv_tasmota_map) {
{ be_const_key(load_freetype_font, -1), be_const_func(lv0_load_freetype_font) },
{ be_const_key(seg7_font, -1), be_const_func(lv0_load_seg7_font) },
{ be_const_key(screenshot, 11), be_const_func(lv0_screenshot) },
{ be_const_key(font_seg7, 1), be_const_func(lv0_load_seg7_font) },
{ be_const_key(splash_init, 0), be_const_closure(lv_tasmota_splash_init_closure) },
{ be_const_key(register_button_encoder, -1), be_const_func(lv0_register_button_encoder) },
{ be_const_key(screenshot, 6), be_const_func(lv0_screenshot) },
{ be_const_key(load_freetype_font, 8), be_const_func(lv0_load_freetype_font) },
{ be_const_key(init, 7), be_const_closure(lv_tasmota_init_closure) },
{ be_const_key(splash_remove, -1), be_const_closure(lv_tasmota_splash_remove_closure) },
{ be_const_key(start, -1), be_const_func(lv0_start) },
{ be_const_key(font_montserrat, -1), be_const_func(lv0_load_montserrat_font) },
{ be_const_key(font_embedded, -1), be_const_func(lv0_load_font_embedded) },
{ be_const_key(montserrat_font, -1), be_const_func(lv0_load_montserrat_font) },
{ be_const_key(init, 7), be_const_closure(lv_tasmota_init_closure) },
{ be_const_key(start, -1), be_const_func(lv0_start) },
{ be_const_key(font_seg7, -1), be_const_func(lv0_load_seg7_font) },
{ be_const_key(font_montserrat, -1), be_const_func(lv0_load_montserrat_font) },
{ be_const_key(seg7_font, -1), be_const_func(lv0_load_seg7_font) },
{ be_const_key(splash, 10), be_const_closure(lv_tasmota_splash_closure) },
};
static be_define_const_map(
m_liblv_tasmota_map,
10
13
);
static be_define_const_module(

View File

@ -12,6 +12,8 @@
extern int be_ntv_display_start(bvm *vm);
extern int be_ntv_display_dimmer(bvm *vm);
extern bool be_ntv_display_started(void);
BE_FUNC_CTYPE_DECLARE(be_ntv_display_started, "b", "")
extern void be_ntv_display_touch_update(int32_t touches, int32_t raw_x, int32_t raw_y, int32_t gesture);
BE_FUNC_CTYPE_DECLARE(be_ntv_display_touch_update, "", "iiii")
extern const char* be_ntv_display_driver_name(void);
@ -20,6 +22,7 @@ extern const char* be_ntv_display_driver_name(void);
/* @const_object_info_begin
module display (scope: global) {
start, func(be_ntv_display_start)
started, ctype_func(be_ntv_display_started)
dimmer, func(be_ntv_display_dimmer)
touch_update, ctype_func(be_ntv_display_touch_update)
driver_name, ctype_func(be_ntv_display_driver_name)

View File

@ -17,12 +17,412 @@ extern int lv0_load_font_embedded(bvm *vm);
extern int lv0_screenshot(bvm *vm);
extern int lv0_load_freetype_font(bvm *vm);
/********************************************************************
** Solidified function: splash_remove
********************************************************************/
be_local_closure(lv_tasmota_splash_remove, /* name */
be_nested_proto(
3, /* nstack */
0, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str(lv),
/* K1 */ be_nested_str(_splash),
/* K2 */ be_nested_str(del),
}),
&be_const_str_splash_remove,
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0xB8020000, // 0000 GETNGBL R0 K0
0x88000101, // 0001 GETMBR R0 R0 K1
0x78020004, // 0002 JMPF R0 #0008
0xB8060000, // 0003 GETNGBL R1 K0
0x4C080000, // 0004 LDNIL R2
0x90060202, // 0005 SETMBR R1 K1 R2
0x8C040102, // 0006 GETMET R1 R0 K2
0x7C040200, // 0007 CALL R1 1
0x80000000, // 0008 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(splash_runner_init, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str(tasmota),
/* K1 */ be_nested_str(add_driver),
}),
&be_const_str_init,
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x5C0C0000, // 0002 MOVE R3 R0
0x7C040400, // 0003 CALL R1 2
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: display
********************************************************************/
be_local_closure(splash_runner_display, /* name */
be_nested_proto(
9, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str(display),
/* K1 */ be_nested_str(dim),
/* K2 */ be_nested_str(started),
/* K3 */ be_nested_str(tasmota),
/* K4 */ be_nested_str(remove_driver),
/* K5 */ be_nested_str(lv),
/* K6 */ be_nested_str(splash),
}),
&be_const_str_display,
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0xA4160000, // 0000 IMPORT R5 K0
0x1C180301, // 0001 EQ R6 R1 K1
0x781A0009, // 0002 JMPF R6 #000D
0x8C180B02, // 0003 GETMET R6 R5 K2
0x7C180200, // 0004 CALL R6 1
0x781A0006, // 0005 JMPF R6 #000D
0xB81A0600, // 0006 GETNGBL R6 K3
0x8C180D04, // 0007 GETMET R6 R6 K4
0x5C200000, // 0008 MOVE R8 R0
0x7C180400, // 0009 CALL R6 2
0xB81A0A00, // 000A GETNGBL R6 K5
0x8C180D06, // 000B GETMET R6 R6 K6
0x7C180200, // 000C CALL R6 1
0x80000000, // 000D RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: splash_runner
********************************************************************/
be_local_class(splash_runner,
0,
NULL,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key(display, -1), be_const_closure(splash_runner_display_closure) },
{ be_const_key(init, 0), be_const_closure(splash_runner_init_closure) },
})),
be_str_literal("splash_runner")
);
/********************************************************************
** Solidified function: splash_init
********************************************************************/
be_local_closure(lv_tasmota_splash_init, /* name */
be_nested_proto(
3, /* nstack */
0, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str(display),
/* K1 */ be_nested_str(started),
/* K2 */ be_nested_str(lv),
/* K3 */ be_nested_str(splash),
/* K4 */ be_const_class(be_class_splash_runner),
}),
&be_const_str_splash_init,
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4020000, // 0000 IMPORT R0 K0
0x8C040101, // 0001 GETMET R1 R0 K1
0x7C040200, // 0002 CALL R1 1
0x78060003, // 0003 JMPF R1 #0008
0xB8060400, // 0004 GETNGBL R1 K2
0x8C040303, // 0005 GETMET R1 R1 K3
0x7C040200, // 0006 CALL R1 1
0x70020003, // 0007 JMP #000C
0x58040004, // 0008 LDCONST R1 K4
0xB4000004, // 0009 CLASS K4
0x5C080200, // 000A MOVE R2 R1
0x7C080000, // 000B CALL R2 0
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: splash
********************************************************************/
be_local_closure(lv_tasmota_splash, /* name */
be_nested_proto(
14, /* nstack */
0, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[42]) { /* constants */
/* K0 */ be_nested_str(display),
/* K1 */ be_nested_str(started),
/* K2 */ be_nested_str(lv),
/* K3 */ be_nested_str(start),
/* K4 */ be_nested_str(obj),
/* K5 */ be_nested_str(scr_act),
/* K6 */ be_nested_str(montserrat_font),
/* K7 */ be_nested_str(color),
/* K8 */ be_nested_str(COLOR_WHITE),
/* K9 */ be_nested_str(set_style_bg_color),
/* K10 */ be_const_int(0),
/* K11 */ be_nested_str(set_style_radius),
/* K12 */ be_nested_str(set_style_pad_all),
/* K13 */ be_nested_str(set_style_border_width),
/* K14 */ be_nested_str(set_size),
/* K15 */ be_nested_str(pct),
/* K16 */ be_nested_str(refr_pos),
/* K17 */ be_nested_str(refr_size),
/* K18 */ be_nested_str(set_user_data),
/* K19 */ be_const_int(1399876712),
/* K20 */ be_nested_str(img),
/* K21 */ be_nested_str(set_tasmota_logo),
/* K22 */ be_nested_str(set_zoom),
/* K23 */ be_nested_str(set_style_img_recolor_opa),
/* K24 */ be_nested_str(set_style_img_recolor),
/* K25 */ be_nested_str(set_align),
/* K26 */ be_nested_str(ALIGN_LEFT_MID),
/* K27 */ be_nested_str(set_x),
/* K28 */ be_nested_str(label),
/* K29 */ be_nested_str(set_style_text_color),
/* K30 */ be_nested_str(set_text),
/* K31 */ be_nested_str(TASMOTA),
/* K32 */ be_nested_str(get_hor_res),
/* K33 */ be_nested_str(set_style_text_font),
/* K34 */ be_nested_str(driver_name),
/* K35 */ be_nested_str(ALIGN_BOTTOM_MID),
/* K36 */ be_const_int(16777215),
/* K37 */ be_nested_str(refr_now),
/* K38 */ be_nested_str(_splash),
/* K39 */ be_nested_str(tasmota),
/* K40 */ be_nested_str(set_timer),
/* K41 */ be_nested_str(splash_remove),
}),
&be_const_str_splash,
&be_const_str_solidified,
( &(const binstruction[166]) { /* code */
0xA4020000, // 0000 IMPORT R0 K0
0x8C040101, // 0001 GETMET R1 R0 K1
0x7C040200, // 0002 CALL R1 1
0x74060000, // 0003 JMPT R1 #0005
0x80000200, // 0004 RET 0
0xB8060400, // 0005 GETNGBL R1 K2
0x8C040303, // 0006 GETMET R1 R1 K3
0x7C040200, // 0007 CALL R1 1
0xB8060400, // 0008 GETNGBL R1 K2
0x8C040304, // 0009 GETMET R1 R1 K4
0xB80E0400, // 000A GETNGBL R3 K2
0x8C0C0705, // 000B GETMET R3 R3 K5
0x7C0C0200, // 000C CALL R3 1
0x7C040400, // 000D CALL R1 2
0xB80A0400, // 000E GETNGBL R2 K2
0x8C080506, // 000F GETMET R2 R2 K6
0x5412001B, // 0010 LDINT R4 28
0x7C080400, // 0011 CALL R2 2
0xB80E0400, // 0012 GETNGBL R3 K2
0x8C0C0706, // 0013 GETMET R3 R3 K6
0x54160013, // 0014 LDINT R5 20
0x7C0C0400, // 0015 CALL R3 2
0xB8120400, // 0016 GETNGBL R4 K2
0x8C100907, // 0017 GETMET R4 R4 K7
0xB81A0400, // 0018 GETNGBL R6 K2
0x88180D08, // 0019 GETMBR R6 R6 K8
0x7C100400, // 001A CALL R4 2
0x8C140309, // 001B GETMET R5 R1 K9
0xB81E0400, // 001C GETNGBL R7 K2
0x8C1C0F07, // 001D GETMET R7 R7 K7
0x54260065, // 001E LDINT R9 102
0x7C1C0400, // 001F CALL R7 2
0x5820000A, // 0020 LDCONST R8 K10
0x7C140600, // 0021 CALL R5 3
0x8C14030B, // 0022 GETMET R5 R1 K11
0x581C000A, // 0023 LDCONST R7 K10
0x5820000A, // 0024 LDCONST R8 K10
0x7C140600, // 0025 CALL R5 3
0x8C14030C, // 0026 GETMET R5 R1 K12
0x581C000A, // 0027 LDCONST R7 K10
0x5820000A, // 0028 LDCONST R8 K10
0x7C140600, // 0029 CALL R5 3
0x8C14030D, // 002A GETMET R5 R1 K13
0x581C000A, // 002B LDCONST R7 K10
0x5820000A, // 002C LDCONST R8 K10
0x7C140600, // 002D CALL R5 3
0x8C14030E, // 002E GETMET R5 R1 K14
0xB81E0400, // 002F GETNGBL R7 K2
0x8C1C0F0F, // 0030 GETMET R7 R7 K15
0x54260063, // 0031 LDINT R9 100
0x7C1C0400, // 0032 CALL R7 2
0xB8220400, // 0033 GETNGBL R8 K2
0x8C20110F, // 0034 GETMET R8 R8 K15
0x542A0063, // 0035 LDINT R10 100
0x7C200400, // 0036 CALL R8 2
0x7C140600, // 0037 CALL R5 3
0x8C140310, // 0038 GETMET R5 R1 K16
0x7C140200, // 0039 CALL R5 1
0x8C140311, // 003A GETMET R5 R1 K17
0x7C140200, // 003B CALL R5 1
0x8C140312, // 003C GETMET R5 R1 K18
0x581C0013, // 003D LDCONST R7 K19
0x7C140400, // 003E CALL R5 2
0xB8160400, // 003F GETNGBL R5 K2
0x8C140B14, // 0040 GETMET R5 R5 K20
0x5C1C0200, // 0041 MOVE R7 R1
0x7C140400, // 0042 CALL R5 2
0x8C180B15, // 0043 GETMET R6 R5 K21
0x7C180200, // 0044 CALL R6 1
0x8C180B16, // 0045 GETMET R6 R5 K22
0x54220095, // 0046 LDINT R8 150
0x7C180400, // 0047 CALL R6 2
0x8C180B17, // 0048 GETMET R6 R5 K23
0x542200FE, // 0049 LDINT R8 255
0x5824000A, // 004A LDCONST R9 K10
0x7C180600, // 004B CALL R6 3
0x8C180B18, // 004C GETMET R6 R5 K24
0x5C200800, // 004D MOVE R8 R4
0x5824000A, // 004E LDCONST R9 K10
0x7C180600, // 004F CALL R6 3
0x8C180B19, // 0050 GETMET R6 R5 K25
0xB8220400, // 0051 GETNGBL R8 K2
0x8820111A, // 0052 GETMBR R8 R8 K26
0x7C180400, // 0053 CALL R6 2
0x8C180B1B, // 0054 GETMET R6 R5 K27
0x5421FFF3, // 0055 LDINT R8 -12
0x7C180400, // 0056 CALL R6 2
0xB81A0400, // 0057 GETNGBL R6 K2
0x8C180D1C, // 0058 GETMET R6 R6 K28
0x5C200200, // 0059 MOVE R8 R1
0x7C180400, // 005A CALL R6 2
0x8C1C0D1D, // 005B GETMET R7 R6 K29
0x5C240800, // 005C MOVE R9 R4
0x5828000A, // 005D LDCONST R10 K10
0x7C1C0600, // 005E CALL R7 3
0x8C1C0D1E, // 005F GETMET R7 R6 K30
0x5824001F, // 0060 LDCONST R9 K31
0x7C1C0400, // 0061 CALL R7 2
0xB81E0400, // 0062 GETNGBL R7 K2
0x8C1C0F20, // 0063 GETMET R7 R7 K32
0x7C1C0200, // 0064 CALL R7 1
0x542200C7, // 0065 LDINT R8 200
0x281C0E08, // 0066 GE R7 R7 R8
0x781E0007, // 0067 JMPF R7 #0070
0x4C1C0000, // 0068 LDNIL R7
0x201C0407, // 0069 NE R7 R2 R7
0x781E0003, // 006A JMPF R7 #006F
0x8C1C0D21, // 006B GETMET R7 R6 K33
0x5C240400, // 006C MOVE R9 R2
0x5828000A, // 006D LDCONST R10 K10
0x7C1C0600, // 006E CALL R7 3
0x70020006, // 006F JMP #0077
0x4C1C0000, // 0070 LDNIL R7
0x201C0607, // 0071 NE R7 R3 R7
0x781E0003, // 0072 JMPF R7 #0077
0x8C1C0D21, // 0073 GETMET R7 R6 K33
0x5C240600, // 0074 MOVE R9 R3
0x5828000A, // 0075 LDCONST R10 K10
0x7C1C0600, // 0076 CALL R7 3
0x8C1C0D19, // 0077 GETMET R7 R6 K25
0xB8260400, // 0078 GETNGBL R9 K2
0x8824131A, // 0079 GETMBR R9 R9 K26
0x7C1C0400, // 007A CALL R7 2
0x8C1C0D1B, // 007B GETMET R7 R6 K27
0x54260029, // 007C LDINT R9 42
0x7C1C0400, // 007D CALL R7 2
0x8C1C0122, // 007E GETMET R7 R0 K34
0x7C1C0200, // 007F CALL R7 1
0x4C200000, // 0080 LDNIL R8
0x6024000C, // 0081 GETGBL R9 G12
0x5C280E00, // 0082 MOVE R10 R7
0x7C240200, // 0083 CALL R9 1
0x2424130A, // 0084 GT R9 R9 K10
0x78260012, // 0085 JMPF R9 #0099
0xB8260400, // 0086 GETNGBL R9 K2
0x8C24131C, // 0087 GETMET R9 R9 K28
0x5C2C0200, // 0088 MOVE R11 R1
0x7C240400, // 0089 CALL R9 2
0x5C201200, // 008A MOVE R8 R9
0x8C241119, // 008B GETMET R9 R8 K25
0xB82E0400, // 008C GETNGBL R11 K2
0x882C1723, // 008D GETMBR R11 R11 K35
0x7C240400, // 008E CALL R9 2
0x8C24111D, // 008F GETMET R9 R8 K29
0xB82E0400, // 0090 GETNGBL R11 K2
0x8C2C1707, // 0091 GETMET R11 R11 K7
0x58340024, // 0092 LDCONST R13 K36
0x7C2C0400, // 0093 CALL R11 2
0x5830000A, // 0094 LDCONST R12 K10
0x7C240600, // 0095 CALL R9 3
0x8C24111E, // 0096 GETMET R9 R8 K30
0x5C2C0E00, // 0097 MOVE R11 R7
0x7C240400, // 0098 CALL R9 2
0xB8260400, // 0099 GETNGBL R9 K2
0x8C241325, // 009A GETMET R9 R9 K37
0x582C000A, // 009B LDCONST R11 K10
0x7C240400, // 009C CALL R9 2
0xB8260400, // 009D GETNGBL R9 K2
0x90264C01, // 009E SETMBR R9 K38 R1
0xB8264E00, // 009F GETNGBL R9 K39
0x8C241328, // 00A0 GETMET R9 R9 K40
0x542E1387, // 00A1 LDINT R11 5000
0xB8320400, // 00A2 GETNGBL R12 K2
0x88301929, // 00A3 GETMBR R12 R12 K41
0x7C240600, // 00A4 CALL R9 3
0x80000000, // 00A5 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(lv_tasmota_init, /* name */
be_nested_proto(
3, /* nstack */
5, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
@ -30,70 +430,93 @@ be_local_closure(lv_tasmota_init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[24]) { /* constants */
( &(const bvalue[31]) { /* constants */
/* K0 */ be_nested_str(lv),
/* K1 */ be_nested_str(start),
/* K2 */ be_nested_str(font_montserrat),
/* K3 */ be_nested_str(montserrat_font),
/* K4 */ be_nested_str(font_seg7),
/* K5 */ be_nested_str(seg7_font),
/* K6 */ be_nested_str(font_embedded),
/* K7 */ be_nested_str(load_freetype_font),
/* K8 */ be_nested_str(register_button_encoder),
/* K9 */ be_nested_str(screenshot),
/* K10 */ be_nested_str(clock_icon),
/* K11 */ be_nested_str(lv_clock_icon),
/* K12 */ be_nested_str(signal_arcs),
/* K13 */ be_nested_str(lv_signal_arcs),
/* K14 */ be_nested_str(signal_bars),
/* K15 */ be_nested_str(lv_signal_bars),
/* K16 */ be_nested_str(wifi_arcs_icon),
/* K17 */ be_nested_str(lv_wifi_arcs_icon),
/* K18 */ be_nested_str(wifi_arcs),
/* K19 */ be_nested_str(lv_wifi_arcs),
/* K20 */ be_nested_str(wifi_bars_icon),
/* K21 */ be_nested_str(lv_wifi_bars_icon),
/* K22 */ be_nested_str(wifi_bars),
/* K23 */ be_nested_str(lv_wifi_bars),
/* K2 */ be_nested_str(splash_init),
/* K3 */ be_nested_str(splash_remove),
/* K4 */ be_nested_str(splash),
/* K5 */ be_nested_str(_splash),
/* K6 */ be_nested_str(font_montserrat),
/* K7 */ be_nested_str(montserrat_font),
/* K8 */ be_nested_str(font_seg7),
/* K9 */ be_nested_str(seg7_font),
/* K10 */ be_nested_str(font_embedded),
/* K11 */ be_nested_str(load_freetype_font),
/* K12 */ be_nested_str(register_button_encoder),
/* K13 */ be_nested_str(screenshot),
/* K14 */ be_nested_str(clock_icon),
/* K15 */ be_nested_str(lv_clock_icon),
/* K16 */ be_nested_str(signal_arcs),
/* K17 */ be_nested_str(lv_signal_arcs),
/* K18 */ be_nested_str(signal_bars),
/* K19 */ be_nested_str(lv_signal_bars),
/* K20 */ be_nested_str(wifi_arcs_icon),
/* K21 */ be_nested_str(lv_wifi_arcs_icon),
/* K22 */ be_nested_str(wifi_arcs),
/* K23 */ be_nested_str(lv_wifi_arcs),
/* K24 */ be_nested_str(wifi_bars_icon),
/* K25 */ be_nested_str(lv_wifi_bars_icon),
/* K26 */ be_nested_str(wifi_bars),
/* K27 */ be_nested_str(lv_wifi_bars),
/* K28 */ be_nested_str(tasmota),
/* K29 */ be_nested_str(get_option),
/* K30 */ be_const_int(0),
}),
&be_const_str_init,
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
( &(const binstruction[51]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x90060202, // 0002 SETMBR R1 K1 R2
0x88080102, // 0003 GETMBR R2 R0 K2
0x90060402, // 0004 SETMBR R1 K2 R2
0x88080102, // 0005 GETMBR R2 R0 K2
0x88080103, // 0005 GETMBR R2 R0 K3
0x90060602, // 0006 SETMBR R1 K3 R2
0x88080104, // 0007 GETMBR R2 R0 K4
0x90060802, // 0008 SETMBR R1 K4 R2
0x88080104, // 0009 GETMBR R2 R0 K4
0x4C080000, // 0009 LDNIL R2
0x90060A02, // 000A SETMBR R1 K5 R2
0x88080106, // 000B GETMBR R2 R0 K6
0x90060C02, // 000C SETMBR R1 K6 R2
0x88080107, // 000D GETMBR R2 R0 K7
0x88080106, // 000D GETMBR R2 R0 K6
0x90060E02, // 000E SETMBR R1 K7 R2
0x88080108, // 000F GETMBR R2 R0 K8
0x90061002, // 0010 SETMBR R1 K8 R2
0x88080109, // 0011 GETMBR R2 R0 K9
0x88080108, // 0011 GETMBR R2 R0 K8
0x90061202, // 0012 SETMBR R1 K9 R2
0xB80A1600, // 0013 GETNGBL R2 K11
0x8808010A, // 0013 GETMBR R2 R0 K10
0x90061402, // 0014 SETMBR R1 K10 R2
0xB80A1A00, // 0015 GETNGBL R2 K13
0x90061802, // 0016 SETMBR R1 K12 R2
0xB80A1E00, // 0017 GETNGBL R2 K15
0x90061C02, // 0018 SETMBR R1 K14 R2
0xB80A2200, // 0019 GETNGBL R2 K17
0x90062002, // 001A SETMBR R1 K16 R2
0xB80A2600, // 001B GETNGBL R2 K19
0x90062402, // 001C SETMBR R1 K18 R2
0xB80A2A00, // 001D GETNGBL R2 K21
0x90062802, // 001E SETMBR R1 K20 R2
0xB80A2E00, // 001F GETNGBL R2 K23
0x90062C02, // 0020 SETMBR R1 K22 R2
0x4C080000, // 0021 LDNIL R2
0x80040400, // 0022 RET 1 R2
0x8808010B, // 0015 GETMBR R2 R0 K11
0x90061602, // 0016 SETMBR R1 K11 R2
0x8808010C, // 0017 GETMBR R2 R0 K12
0x90061802, // 0018 SETMBR R1 K12 R2
0x8808010D, // 0019 GETMBR R2 R0 K13
0x90061A02, // 001A SETMBR R1 K13 R2
0xB80A1E00, // 001B GETNGBL R2 K15
0x90061C02, // 001C SETMBR R1 K14 R2
0xB80A2200, // 001D GETNGBL R2 K17
0x90062002, // 001E SETMBR R1 K16 R2
0xB80A2600, // 001F GETNGBL R2 K19
0x90062402, // 0020 SETMBR R1 K18 R2
0xB80A2A00, // 0021 GETNGBL R2 K21
0x90062802, // 0022 SETMBR R1 K20 R2
0xB80A2E00, // 0023 GETNGBL R2 K23
0x90062C02, // 0024 SETMBR R1 K22 R2
0xB80A3200, // 0025 GETNGBL R2 K25
0x90063002, // 0026 SETMBR R1 K24 R2
0xB80A3600, // 0027 GETNGBL R2 K27
0x90063402, // 0028 SETMBR R1 K26 R2
0xB80A3800, // 0029 GETNGBL R2 K28
0x8C08051D, // 002A GETMET R2 R2 K29
0x54120086, // 002B LDINT R4 135
0x7C080400, // 002C CALL R2 2
0x1C08051E, // 002D EQ R2 R2 K30
0x780A0001, // 002E JMPF R2 #0031
0x8C080302, // 002F GETMET R2 R1 K2
0x7C080200, // 0030 CALL R2 1
0x4C080000, // 0031 LDNIL R2
0x80040400, // 0032 RET 1 R2
})
)
);
@ -104,6 +527,9 @@ module lv_tasmota (scope: global) {
init, closure(lv_tasmota_init_closure)
start, func(lv0_start)
splash, closure(lv_tasmota_splash_closure)
splash_init, closure(lv_tasmota_splash_init_closure)
splash_remove, closure(lv_tasmota_splash_remove_closure)
font_montserrat, func(lv0_load_montserrat_font)
montserrat_font, func(lv0_load_montserrat_font)

View File

@ -7,6 +7,10 @@ lv_tasmota = module("lv_tasmota")
def init(lv_tasmota)
import lv
lv.start = lv_tasmota.start
lv.splash_init = lv_tasmota.splash_init
lv.splash_remove = lv_tasmota.splash_remove
lv.splash = lv_tasmota.splash
lv._splash = nil # store a reference for the current splash screen parent
lv.font_montserrat = lv_tasmota.font_montserrat
lv.montserrat_font = lv_tasmota.font_montserrat
@ -29,9 +33,112 @@ def init(lv_tasmota)
lv.wifi_bars_icon = lv_wifi_bars_icon
lv.wifi_bars = lv_wifi_bars
# display splash screen unless `SetOption135 1` is set
if tasmota.get_option(135) == 0
lv.splash_init()
end
return nil
end
lv_tasmota.init = init
# run splash now or schedlue later
def splash_init()
import display
if display.started()
lv.splash() # if display is ready, just do splash now
else
# register a driver until display starts
# create a class for deferred run
class splash_runner
def init()
tasmota.add_driver(self) # register driver
end
def display(cmd, idx, payload, raw)
import display
if cmd == "dim" && display.started()
tasmota.remove_driver(self)
lv.splash()
end
end
end
splash_runner() # create an instance, it auto-registers
end
end
lv_tasmota.splash_init = splash_init
# remove splash
def splash_remove()
var _splash = lv._splash
if _splash
lv._splash = nil
_splash.del()
end
end
lv_tasmota.splash_remove = splash_remove
def splash()
import display
if !display.started() return end
lv.start() # just in case it was not already started
var bg = lv.obj(lv.scr_act()) # create a parent object for splash screen
var f28 = lv.montserrat_font(28) # load embedded Montserrat 28
var f20 = lv.montserrat_font(20) # load embedded Montserrat 20
var white = lv.color(lv.COLOR_WHITE)
bg.set_style_bg_color(lv.color(0x000066), 0) # lv.PART_MAIN | lv.STATE_DEFAULT
bg.set_style_radius(0, 0)
bg.set_style_pad_all(0, 0)
bg.set_style_border_width(0, 0)
bg.set_size(lv.pct(100), lv.pct(100))
bg.refr_pos()
bg.refr_size()
# 0x53706C68 = 'Splh' indicating the screen is Splash screen
bg.set_user_data(0x53706C68)
var tas_logo = lv.img(bg)
tas_logo.set_tasmota_logo()
tas_logo.set_zoom(150)
tas_logo.set_style_img_recolor_opa(255, 0) # lv.PART_MAIN | lv.STATE_DEFAULT
tas_logo.set_style_img_recolor(white, 0) # lv.PART_MAIN | lv.STATE_DEFAULT
tas_logo.set_align(lv.ALIGN_LEFT_MID)
tas_logo.set_x(-12)
var tas = lv.label(bg)
# tas.set_style_bg_opa(lv.OPA_TRANSP, lv.PART_MAIN | lv.STATE_DEFAULT)
tas.set_style_text_color(white, 0) # lv.PART_MAIN | lv.STATE_DEFAULT
tas.set_text("TASMOTA")
if lv.get_hor_res() >= 200
if f28 != nil tas.set_style_text_font(f28, 0) end
else
if f20 != nil tas.set_style_text_font(f20, 0) end
end
tas.set_align(lv.ALIGN_LEFT_MID)
tas.set_x(42)
var driver_name = display.driver_name()
var disp
if size(driver_name) > 0
disp = lv.label(bg)
disp.set_align(lv.ALIGN_BOTTOM_MID)
# disp.set_style_bg_opa(lv.OPA_TRANSP, lv.PART_MAIN | lv.STATE_DEFAULT)
disp.set_style_text_color(lv.color(0xFFFFFF), 0) # lv.PART_MAIN | lv.STATE_DEFAULT
disp.set_text(driver_name)
end
# force full refresh now and not at next tick
lv.refr_now(0)
lv._splash = bg # keep a reference to the splash screen
tasmota.set_timer(5000, lv.splash_remove) # delete the object in the future
end
lv_tasmota.splash = splash
return lv_tasmota

View File

@ -164,7 +164,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t tls_use_fingerprint : 1; // bit 18 (v10.0.0.4) - SetOption132 - (TLS) Use fingerprint validation instead of CA based
uint32_t shift595_invert_outputs : 1; // bit 19 (v10.0.0.4) - SetOption133 - (Shift595) Invert outputs of 74x595 shift registers
uint32_t pwm_force_same_phase : 1; // bit 20 (v10.1.0.6) - SetOption134 - (PWM) force PWM lights to start at same phase, default is to spread phases to minimze overlap (also needed for H-bridge)
uint32_t spare21 : 1; // bit 21
uint32_t display_no_splash : 1; // bit 21 (v11.0.0.2) - SetOption135 - (Display & LVGL) forece disbabling default splash screen
uint32_t spare22 : 1; // bit 22
uint32_t spare23 : 1; // bit 23
uint32_t spare24 : 1; // bit 24

View File

@ -79,15 +79,25 @@ void be_ntv_display_touch_update(int32_t touches, int32_t raw_x, int32_t raw_y,
}
const char* be_ntv_display_driver_name(void) {
#ifdef USE_UNIVERSAL_DISPLAY
if (renderer) {
char* devname = renderer->devname();
if (devname) {
return devname;
}
}
#endif
return "";
}
bool be_ntv_display_started(void) {
#ifdef USE_UNIVERSAL_DISPLAY
if (renderer) {
return true;
}
#endif
return false;
}
#endif // USE_DISPLAY
#endif // USE_BERRY

View File

@ -390,6 +390,17 @@ extern "C" {
uconfig = be_tostring(vm, 1);
}
start_lvgl(uconfig);
// call lv.splash_remove() to kill any current splash screen
if (be_getglobal(vm, "lv")) {
if (be_getmember(vm, -1, "splash_remove")) {
// call it
be_call(vm, 0);
}
be_pop(vm, 1);
}
be_pop(vm, 1);
be_return_nil(vm);
}
be_raise(vm, kTypeError, nullptr);

View File

@ -348,7 +348,7 @@ void start_lvgl(const char * uconfig);
void start_lvgl(const char * uconfig) {
if (glue != nullptr) {
AddLog(LOG_LEVEL_INFO, D_LOG_LVGL "LVGL was already initialized");
AddLog(LOG_LEVEL_DEBUG, D_LOG_LVGL "LVGL was already initialized");
return;
}

View File

@ -80,12 +80,14 @@ void SSD1306InitDriver(void) {
renderer->setTextColor(1,0);
#ifdef SHOW_SPLASH
renderer->setTextFont(0);
renderer->setTextSize(2);
renderer->setCursor(20,20);
renderer->println(F("SSD1306"));
renderer->Updateframe();
renderer->DisplayOnff(1);
if (!Settings->flag5.display_no_splash) {
renderer->setTextFont(0);
renderer->setTextSize(2);
renderer->setCursor(20,20);
renderer->println(F("SSD1306"));
renderer->Updateframe();
renderer->DisplayOnff(1);
}
#endif
AddLog(LOG_LEVEL_INFO, PSTR("DSP: SSD1306"));

View File

@ -100,12 +100,14 @@ void ILI9341_InitDriver()
renderer->dim(GetDisplayDimmer16());
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->setTextSize(1);
renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
renderer->DrawStringAt(50, (Settings->display_height/2)-12, (Settings->display_options.type & 3)==ILIMODE_9341?"ILI9341 TFT!":"ILI9342 TFT!", ILI9341_WHITE, 0);
delay(1000);
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextFont(2);
renderer->setTextSize(1);
renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
renderer->DrawStringAt(50, (Settings->display_height/2)-12, (Settings->display_options.type & 3)==ILIMODE_9341?"ILI9341 TFT!":"ILI9342 TFT!", ILI9341_WHITE, 0);
delay(1000);
}
#endif // SHOW_SPLASH
color_type = COLOR_COLOR;

View File

@ -77,13 +77,15 @@ void EpdInitDriver29(void) {
renderer->setTextColor(1,0);
#ifdef SHOW_SPLASH
// Welcome text
delay(100);
renderer->setTextFont(1);
renderer->DrawStringAt(50, 50, "Waveshare E-Paper Display!", COLORED,0);
renderer->Updateframe();
delay(1000);
renderer->fillScreen(0);
if (!Settings->flag5.display_no_splash) {
// Welcome text
delay(100);
renderer->setTextFont(1);
renderer->DrawStringAt(50, 50, "Waveshare E-Paper Display!", COLORED,0);
renderer->Updateframe();
delay(1000);
renderer->fillScreen(0);
}
#endif
epd_init_done = true;

View File

@ -81,12 +81,14 @@ void EpdInitDriver42() {
renderer->setTextColor(1,0);
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->DrawStringAt(50, 140, "Waveshare E-Paper!", COLORED42,0);
renderer->Updateframe();
delay(350);
renderer->fillScreen(0);
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextFont(2);
renderer->DrawStringAt(50, 140, "Waveshare E-Paper!", COLORED42,0);
renderer->Updateframe();
delay(350);
renderer->fillScreen(0);
}
#endif
epd42_init_done = true;

View File

@ -78,12 +78,14 @@ void SH1106InitDriver() {
renderer->setTextColor(1,0);
#ifdef SHOW_SPLASH
renderer->setTextFont(0);
renderer->setTextSize(2);
renderer->setCursor(20,20);
renderer->println(F("SH1106"));
renderer->Updateframe();
renderer->DisplayOnff(1);
if (!Settings->flag5.display_no_splash) {
renderer->setTextFont(0);
renderer->setTextSize(2);
renderer->setCursor(20,20);
renderer->println(F("SH1106"));
renderer->Updateframe();
renderer->DisplayOnff(1);
}
#endif
AddLog(LOG_LEVEL_INFO, PSTR("DSP: SH1106"));

View File

@ -71,11 +71,13 @@ void SSD1351_InitDriver() {
renderer->dim(GetDisplayDimmer16());
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->setTextColor(SSD1351_WHITE,SSD1351_BLACK);
renderer->DrawStringAt(10, 60, "SSD1351", SSD1351_RED,0);
delay(1000);
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextFont(2);
renderer->setTextColor(SSD1351_WHITE,SSD1351_BLACK);
renderer->DrawStringAt(10, 60, "SSD1351", SSD1351_RED,0);
delay(1000);
}
#endif
color_type = COLOR_COLOR;

View File

@ -65,11 +65,13 @@ void RA8876_InitDriver(void) {
//testall();
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->setTextColor(RA8876_WHITE,RA8876_BLACK);
renderer->DrawStringAt(600, 300, "RA8876", RA8876_RED,0);
delay(1000);
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextFont(2);
renderer->setTextColor(RA8876_WHITE,RA8876_BLACK);
renderer->DrawStringAt(600, 300, "RA8876", RA8876_RED,0);
delay(1000);
}
#endif
color_type = COLOR_COLOR;

View File

@ -96,11 +96,13 @@ void ST7789_InitDriver(void) {
renderer->dim(GetDisplayDimmer16());
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextColor(ST7789_WHITE,ST7789_BLACK);
renderer->setTextFont(2);
renderer->DrawStringAt(30, (Settings->display_height-12)/2, "ST7789 TFT!", ST7789_WHITE,0);
delay(1000);
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextColor(ST7789_WHITE,ST7789_BLACK);
renderer->setTextFont(2);
renderer->DrawStringAt(30, (Settings->display_height-12)/2, "ST7789 TFT!", ST7789_WHITE,0);
delay(1000);
}
#endif
color_type = COLOR_COLOR;

View File

@ -76,12 +76,14 @@ void SSD1331_InitDriver() {
renderer->dim(GetDisplayDimmer16());
#ifdef SHOW_SPLASH
// Welcome text
renderer->clearDisplay();
renderer->setTextFont(1);
renderer->DrawStringAt(24, 27, "SSD1331", SSD1331_RED, 0);
delay(1000);
renderer->clearDisplay();
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->clearDisplay();
renderer->setTextFont(1);
renderer->DrawStringAt(24, 27, "SSD1331", SSD1331_RED, 0);
delay(1000);
renderer->clearDisplay();
}
#endif
color_type = COLOR_COLOR;

View File

@ -57,10 +57,12 @@ void EpdInitDriver47(void) {
renderer->setTextColor(EPD47_BLACK, EPD47_WHITE);
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->DrawStringAt(50, 50, "LILGO 4.7 E-Paper Display!", EPD47_BLACK, 0);
renderer->Updateframe();
if (!Settings->flag5.display_no_splash) {
// Welcome text
renderer->setTextFont(2);
renderer->DrawStringAt(50, 50, "LILGO 4.7 E-Paper Display!", EPD47_BLACK, 0);
renderer->Updateframe();
}
#endif
fg_color = EPD47_BLACK;

View File

@ -324,7 +324,9 @@ int8_t cs;
ApplyDisplayDimmer();
#ifdef SHOW_SPLASH
renderer->Splash();
if (!Settings->flag5.display_no_splash) {
renderer->Splash();
}
#endif // SHOW_SPLASH
udisp_init_done = true;