From 9f4474a19cd637be798a61a5f22ba2a23affab50 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Sat, 28 Oct 2023 20:51:57 -0700 Subject: [PATCH] remove warnings --- components/platform_console/cmd_system.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/platform_console/cmd_system.c b/components/platform_console/cmd_system.c index cffe39b3..d9bc1f14 100644 --- a/components/platform_console/cmd_system.c +++ b/components/platform_console/cmd_system.c @@ -64,8 +64,10 @@ static void register_heap(); static void register_dump_heap(); static void register_version(); static void register_restart(); +#if CONFIG_WITH_CONFIG_UI static void register_deep_sleep(); static void register_light_sleep(); +#endif static void register_factory_boot(); static void register_restart_ota(); static void register_set_services(); @@ -552,7 +554,7 @@ static void register_tasks() /** 'deep_sleep' command puts the chip into deep sleep mode */ - +#if CONFIG_WITH_CONFIG_UI static struct { struct arg_int *wakeup_time; struct arg_int *wakeup_gpio_num; @@ -616,6 +618,8 @@ static void register_deep_sleep() }; ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); } +#endif + static int enable_disable(FILE * f,char * nvs_name, struct arg_lit *arg){ esp_err_t err = config_set_value(NVS_TYPE_STR, nvs_name, arg->count>0?"Y":"N"); const char * name = arg->hdr.longopts?arg->hdr.longopts:arg->hdr.glossary; @@ -731,6 +735,8 @@ static void register_set_services(){ cmd_to_json_with_cb(&cmd,&set_services_cb); ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); } + +#if CONFIG_WITH_CONFIG_UI static struct { struct arg_int *wakeup_time; struct arg_int *wakeup_gpio_num; @@ -822,4 +828,4 @@ static void register_light_sleep() }; ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); } - +#endif