Added styleguid.xml to editor

This commit is contained in:
RobinVdB8
2023-11-20 13:20:46 +01:00
parent b79a42b767
commit bbbf17b5ca

View File

@@ -31,7 +31,7 @@ static int inpub_id;
static const char *TAG = "mug"; static const char *TAG = "mug";
static uint16_t xpos; static uint16_t xpos;
static uint16_t ypos; static uint16_t ypos;
static sFONT* font = LCD_FONT16; static sFONT* font;
static uint32_t color; static uint32_t color;
static uint32_t bgcolor; static uint32_t bgcolor;
@@ -94,21 +94,22 @@ static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t f
switch(inpub_id) { switch(inpub_id) {
case 0: case 0:
//lcd_display_text("teststring", xpos, ypos, color, bgcolor, font); //lcd_display_text("teststring", xpos, ypos, color, bgcolor, font);
LOG_INFO(TAG, "incoming data on input/setText:\n %s.", data); LOG_INFO(TAG, "incoming data on input/setText: %s.", data);
lcd_display_text(data_buffer, xpos, ypos, color, bgcolor, font); lcd_display_text(data_buffer, xpos, ypos, color, bgcolor, font);
break; break;
case 1: case 1:
//places an image on the lcd //places an image on the lcd
LOG_INFO(TAG, "incoming data on input/setImage:\n %s.", data); LOG_INFO(TAG, "incoming data on input/setImage: %s.", data);
//call function here
break; break;
case 2: case 2:
//changes the text color on the lcd //changes the text color on the lcd
LOG_INFO(TAG, "incoming data on input/setTextColor:\n %s.", data); LOG_INFO(TAG, "incoming data on input/setTextColor: %s.", data);
color = color_picker(data_buffer); color = color_picker(data_buffer);
break; break;
case 3: case 3:
//changes the background color //changes the background color
LOG_INFO(TAG, "incoming data on input/setColor:\n %s.", data); LOG_INFO(TAG, "incoming data on input/setColor: %s.", data);
bgcolor = color_picker(data_buffer); bgcolor = color_picker(data_buffer);
break; break;
default: default:
@@ -171,6 +172,7 @@ static void example_do_connect(mqtt_client_t *client) {
void mug_init(void) { void mug_init(void) {
color = LCD_BLACK; color = LCD_BLACK;
bgcolor = LCD_WHITE; bgcolor = LCD_WHITE;
font = LCD_FONT16;
xpos = 50; xpos = 50;
ypos = 50; ypos = 50;