FIX include of lora.hpp in cli
Automated CI Build of FoxMesh / build-and-test (push) Skipped

Dieser Commit ist enthalten in:
tom committed 2026-10-18 01:27:07 +02:00
1 Ursprung 63b77838a2
Commit 89599c9fd6
2 Dateien geändert
+27

Keine Dateien entsprechen Ihrer Suche

+7
Datei anzeigen
@@ -13,6 +13,7 @@
#include "i2c.hpp" #include "i2c.hpp"
#include "led.hpp" #include "led.hpp"
#include "display.hpp" #include "display.hpp"
#include "lora.hpp"
/** /**
* @brief Store peripheral, display, and hardware tracking references for CLI access. * @brief Store peripheral, display, and hardware tracking references for CLI access.
@@ -22,6 +23,12 @@
*/ */
void cli_init(i2c* bus_pointer, LedController* led_pointer, DisplayController* display_pointer); void cli_init(i2c* bus_pointer, LedController* led_pointer, DisplayController* display_pointer);
/**
* @brief Connects the asynchronous LoRa subsystem reference context back onto the interface layer.
* @param lora_pointer Active LoRa transceiver module controller layer instance.
*/
void cli_init_lora(LoraController* lora_pointer);
/** /**
* @brief Registers the background tasks and setup routines for core runtime execution. * @brief Registers the background tasks and setup routines for core runtime execution.
*/ */
+20
Datei anzeigen
@@ -19,6 +19,7 @@
#include "cli.hpp" #include "cli.hpp"
#include "i2c.hpp" #include "i2c.hpp"
#include "display.hpp" // FIXED: Added missing header for DisplayController #include "display.hpp" // FIXED: Added missing header for DisplayController
#include "lora.hpp"
/** /**
* @brief Global log categorization tag context for the main application loader. * @brief Global log categorization tag context for the main application loader.
@@ -35,6 +36,11 @@ i2c* i2c_bus = nullptr;
*/ */
DisplayController* display = nullptr; DisplayController* display = nullptr;
/**
* @brief Global pointer tracking the Semtech SX1276 core radio frquency
*/
LoraController* lora_module = nullptr;
/** /**
* @brief Static singleton instance governing hardware status LED blink patterns. * @brief Static singleton instance governing hardware status LED blink patterns.
*/ */
@@ -104,6 +110,20 @@ extern "C" {
// Spin up the background console interface thread on Core 0 // Spin up the background console interface thread on Core 0
start_cli_task(); start_cli_task();
// LORA initialization and activation
lora_module = new LoraController();
if (lora_module != nullptr) {
//connects the lora instance with the CLI control directly (commands freq and bw)
cli_init_lora(lora_module);
// start the radio task strict to the Core 1 (Priority 6)
lora_module->startTask(6);
ESP_LOGI(TAG, "LoRa subsystem successfully activated on Core 1.");
} else {
ESP_LOGI(TAG, "Critical: Failed to allocate memory for LoraController!");
}
// Trigger synchronous welcome splash screen frame // Trigger synchronous welcome splash screen frame
if (display != nullptr) { if (display != nullptr) {
char msg[32]; char msg[32];