mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#include "flatbuffers_generated/RobotModule_generated.h"
|
|
#if !defined(RMT_TEST) || (defined(RMT_TEST) && RMT_TEST == 0)
|
|
// #include <cstdio>
|
|
// #include <memory>
|
|
|
|
#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<LoopManager>();
|
|
|
|
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
|