Kaynağa Gözat

remove warnings

philippe44 1 yıl önce
ebeveyn
işleme
9f4474a19c
1 değiştirilmiş dosya ile 8 ekleme ve 2 silme
  1. 8 2
      components/platform_console/cmd_system.c

+ 8 - 2
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