diff --git a/examples/demo/LilyGoGui/LilyGoGui.ino b/examples/demo/LilyGoGui/LilyGoGui.ino index 3b4f63d..8543ec3 100644 --- a/examples/demo/LilyGoGui/LilyGoGui.ino +++ b/examples/demo/LilyGoGui/LilyGoGui.ino @@ -54,7 +54,7 @@ IRsend irsend(BOARD_IR_PIN); #include "ui.h" #include "src/mp3_ring_1.h" #include "src/mp3_ring_setup.h" - +#include "driver/gpio.h" AudioFileSourceSPIFFS *file_fs; AudioGeneratorWAV *wav = NULL; @@ -1486,7 +1486,7 @@ static void PDM_Record(const char *song_name, uint32_t duration) // Record until "file_size" bytes have been read from mic. uint32_t counter = 0; - uint32_t bytes_written; + size_t bytes_written = 0; Serial.println("Recording started"); int percentage = 0; diff --git a/examples/demo/LilyGoGui/app_wireless.cpp b/examples/demo/LilyGoGui/app_wireless.cpp index f60fad1..86735e0 100644 --- a/examples/demo/LilyGoGui/app_wireless.cpp +++ b/examples/demo/LilyGoGui/app_wireless.cpp @@ -113,7 +113,7 @@ static struct { LV_FONT_DECLARE(alibaba_font); static lv_obj_t *create_obj_with_label(lv_obj_t *cont, textarea_config_t *u); -static lv_obj_t *create_btn_on_label(lv_obj_t *cont, char *text); +static lv_obj_t *create_btn_on_label(lv_obj_t *cont,const char *text); static void get_wifi_ssid_event_cb(lv_event_t *e); static void connect_wifi_event_cb(lv_event_t *e); @@ -209,7 +209,7 @@ static lv_obj_t *create_obj_with_label(lv_obj_t *cont, textarea_config_t *u) { return obj; } -static lv_obj_t *create_btn_on_label(lv_obj_t *cont, char *text) { +static lv_obj_t *create_btn_on_label(lv_obj_t *cont,const char *text) { lv_obj_t *btn = lv_btn_create(cont); lv_obj_set_size(btn, 40, 35); diff --git a/examples/demo/LilyGoGui/app_wireless.h b/examples/demo/LilyGoGui/app_wireless.h index 5b9ac6d..18d8489 100644 --- a/examples/demo/LilyGoGui/app_wireless.h +++ b/examples/demo/LilyGoGui/app_wireless.h @@ -10,7 +10,7 @@ typedef struct { lv_align_t align; lv_coord_t x_ofs; lv_coord_t y_ofs; - char *text; + const char *text; } textarea_config_t; void app_wireless_load(lv_obj_t *cont); diff --git a/examples/demo/LilyGoGui/ui.cpp b/examples/demo/LilyGoGui/ui.cpp index 646b4d3..c975f95 100644 --- a/examples/demo/LilyGoGui/ui.cpp +++ b/examples/demo/LilyGoGui/ui.cpp @@ -46,7 +46,7 @@ extern lv_obj_t * batt_voltage_label; extern lv_timer_t *transmitTask; extern void suspend_vadTaskHandler(void); -static void create_app(lv_obj_t *parent, char *name, const lv_img_dsc_t *img, app_t *app_fun) { +static void create_app(lv_obj_t *parent,const char *name, const lv_img_dsc_t *img, app_t *app_fun) { /* Create an interactive button named after the app. */ lv_obj_t *btn = lv_btn_create(parent); lv_obj_set_size(btn, 150, lv_pct(100)); @@ -69,7 +69,7 @@ static void create_app(lv_obj_t *parent, char *name, const lv_img_dsc_t *img, ap lv_msg_send(MSG_MENU_NAME_CHANGED, text); } }, - LV_EVENT_FOCUSED, name); + LV_EVENT_FOCUSED, (void*)name); /* Click to select event callback */ lv_obj_add_event_cb( btn, diff --git a/src/LilyGoLib.cpp b/src/LilyGoLib.cpp index dd9e20d..b59241e 100644 --- a/src/LilyGoLib.cpp +++ b/src/LilyGoLib.cpp @@ -574,15 +574,6 @@ void LilyGoLib::sleep(uint32_t second) esp_deep_sleep_start(); } -int16_t LilyGoLib::sleep() -{ - sleep(0); - return 0; -} - - - - diff --git a/src/LilyGoLib.h b/src/LilyGoLib.h index 1080d65..06e0a6e 100644 --- a/src/LilyGoLib.h +++ b/src/LilyGoLib.h @@ -152,9 +152,7 @@ public: void sleepLora(bool config); void setSleepMode(SleepMode_t mode); - void sleep(uint32_t second) ; - int16_t sleep() override; - + void sleep(uint32_t second = 0) ; private: