Fix RIP bugs, add in UART

This commit is contained in:
Johnathon Slightham
2026-03-31 14:26:37 -04:00
committed by Johnathon Slightham
parent d4602012f1
commit 548e8db484
26 changed files with 704 additions and 434 deletions

View File

@@ -2,6 +2,7 @@
#include "BlockingQueue.h"
#include "Frames.h"
#include "RMTManager.h"
#include "SoftUARTManager.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include <memory>
@@ -13,9 +14,15 @@
*
* @param board_id Board ID of the current board. Will be written to the NVM under key "board" if not already written.
*/
DataLinkManager::DataLinkManager(uint8_t board_id, uint8_t num_channels = MAX_CHANNELS){
DataLinkManager::DataLinkManager(uint8_t board_id, uint8_t num_channels, PhysicalLayerType phy_type){
//init table for this board and set up link layer priority queue
phys_comms = std::make_unique<RMTManager>(num_channels);
if (phy_type == PhysicalLayerType::SOFT_UART){
phys_comms = std::make_unique<SoftUARTManager>(num_channels);
ESP_LOGI(DEBUG_LINK_TAG, "Using SoftUART physical layer");
} else {
phys_comms = std::make_unique<RMTManager>(num_channels);
ESP_LOGI(DEBUG_LINK_TAG, "Using RMT physical layer");
}
if (phys_comms == nullptr){
ESP_LOGE(DEBUG_LINK_TAG, "RMT object was not created. Link layer communications will not function.");
return;