Add LCD output to shell function 'Emulate UI'
This commit is contained in:
		@@ -815,10 +815,16 @@ int gui_handle(void)
 | 
			
		||||
 | 
			
		||||
void gui_init(void)
 | 
			
		||||
{
 | 
			
		||||
	/** - Setup the rotary encoder input */
 | 
			
		||||
	rotary_encoder_setup();
 | 
			
		||||
 | 
			
		||||
	/** - Setup the push button */
 | 
			
		||||
	button_init();
 | 
			
		||||
 | 
			
		||||
	/** - Setup the LCD */
 | 
			
		||||
	lcd_init();
 | 
			
		||||
 | 
			
		||||
	/** - If an overlay has been previously set, clear it */
 | 
			
		||||
	if (overlay_heading)
 | 
			
		||||
		free(overlay_heading);
 | 
			
		||||
	if (overlay_text)
 | 
			
		||||
@@ -827,6 +833,7 @@ void gui_init(void)
 | 
			
		||||
	overlay_heading = NULL;
 | 
			
		||||
	overlay_text = NULL;
 | 
			
		||||
 | 
			
		||||
	/** - Init the GUI menu */
 | 
			
		||||
	menu_init(reflow_menu_ptr, gui_menu_root_entry, update_display_buffer);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -853,3 +860,13 @@ void gui_lcd_write_direct_blocking(uint8_t line, const char *text)
 | 
			
		||||
	lcd_setcursor(0, line);
 | 
			
		||||
	lcd_string(text);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
size_t gui_get_line_count(void)
 | 
			
		||||
{
 | 
			
		||||
	return (size_t)LCD_ROW_COUNT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char (*gui_get_current_display_content(void))[21]
 | 
			
		||||
{
 | 
			
		||||
	return display_buffer;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user