daily update, add lora files

Dieser Commit ist enthalten in:
tom committed 2026-10-17 23:43:07 +02:00
1 Ursprung 0ab736b338
Commit 19345c3b4b
8 Dateien geändert
+412 -80

Keine Dateien entsprechen Ihrer Suche

+34 -9
Datei anzeigen
@@ -2,7 +2,7 @@
* @file main.cpp
* @brief Main application entry point for the FoxMesh tracking node
* @author OM Tom (OE3TKT)
*
*
* @license SPDX-License-Identifier: MIT
* @copyright Copyright (c) 2026 OM Tom (OE3TKT)
* For the full license terms, see the LICENSE file in the project root.
@@ -20,19 +20,31 @@
#include "i2c.hpp"
#include "display.hpp" // FIXED: Added missing header for DisplayController
/**
* @brief Global log categorization tag context for the main application loader.
*/
static const char *TAG = "MAIN";
// Global pointer to the thread-safe hardware abstraction instances
/**
* @brief Global pointer tracking the synchronized thread-safe I2C master bus instance.
*/
i2c* i2c_bus = nullptr;
/**
* @brief Global pointer tracking the asynchronous isolated OLED render controller instance.
*/
DisplayController* display = nullptr;
// Global singleton instances for hardware abstraction layers
/**
* @brief Static singleton instance governing hardware status LED blink patterns.
*/
static LedController led(Config::LED_GPIO_PIN);
/**
* @brief Initializes the physical SPI peripheral for the Semtech SX1276 transceiver.
*
* Configures VSPI (SPI3_HOST) using strict compile-time configurations from config.hpp.
*
* Configures the VSPI (SPI3_HOST) back-end utilizing strict compile-time layouts
* mapped inside config.hpp and configures automatic DMA channel routing.
*/
void init_lora_spi(void) {
esp_err_t ret;
@@ -56,6 +68,12 @@ void init_lora_spi(void) {
// Global application anchor marked as extern "C" for the native ESP-IDF bootloader
extern "C" {
/**
* @brief System core entry point executing synchronous initialization loops.
*
* Spawns the decoupled system worker threads, establishes thread-safe hardware
* bus routing layers, and boots up the interactive terminal environment on Core 0.
*/
void app_main(void) {
// Output system banner configuration parameters on boot
ESP_LOGI(TAG, "=================================================");
@@ -73,7 +91,9 @@ extern "C" {
// Instantiate and activate the isolated background render worker on Core 0
display = new DisplayController(i2c_bus);
display->startTask();
if (display != nullptr) {
display->startTask();
}
// Pass the bus instance dependency to the interactive terminal layer
cli_init(i2c_bus, &led, display);
@@ -85,15 +105,20 @@ extern "C" {
start_cli_task();
// Trigger synchronous welcome splash screen frame
display->printMessage("FoxMesh Ready", 0);
if (display != nullptr) {
char msg[32];
//display->printMessage(0, "FoxMesh " Config::PROJECT_VERSION " \x86" "OE3TKT");
snprintf(msg, sizeof(msg), "FoxMesh %s OE3TKT", Config::PROJECT_VERSION);
display->printMessage(1, msg);
display->printMessage(2, "Bärbel frühstückt ©");
}
// Main system watchdog and status monitor loop
while (true) {
ESP_LOGI(TAG, "[%s v%s] Operational. Free Heap: %lu bytes",
Config::PROJECT_TITLE,
Config::PROJECT_VERSION,
(unsigned long)esp_get_free_heap_size());
vTaskDelay(pdMS_TO_TICKS(5000));
}
}