#include "flatbuffers_generated/RobotModule_generated.h" #if !defined(RMT_TEST) || (defined(RMT_TEST) && RMT_TEST == 0) // #include // #include #include "freertos/FreeRTOS.h" #include "sdkconfig.h" #include "ConfigManager.h" #include "LoopManager.h" #include "esp_log.h" #include "RemoteDebugging.h" #include "RemoteManagement.h" #include "RemoteConfig.h" extern "C" [[noreturn]] void app_main(void) { ESP_LOGI("MEM", "Free internal RAM: %d", heap_caps_get_free_size(MALLOC_CAP_8BIT)); ESP_LOGI("MEM", "Free PSRAM: %d", heap_caps_get_free_size(MALLOC_CAP_SPIRAM)); auto& config_manager = ConfigManager::get_instance(); // NOLINT - here for easily adding temporary config esp_log_set_vprintf(RemoteDebugging::custom_log_write); const auto loop_manager = std::make_unique(); RemoteDebugging::register_calls(loop_manager->get_messaging_interface()); RemoteManagement::register_calls(loop_manager->get_messaging_interface()); RemoteConfig::register_calls(loop_manager->get_messaging_interface(), config_manager); RemoteManagement::mark_ota_success(); loop_manager->control_loop(); } #endif