#include #include "esp_system.h" #include "dev_name.h" #include "storage.h" void app_main(void) { printf("\n"); if (storage_init() == false) { printf("Failed to init storage!\n"); fflush(stdout); esp_restart(); } if (dev_generate_name_if_required()) { printf("Generated a new device name\n"); } char *name = dev_name(); printf("Dev name: %s\n", name); free(name); fflush(stdout); esp_restart(); }