mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Cleanup includes
This actually gained us 10% more flash space
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
|
||||
#include <mutex>
|
||||
#include <esp_log.h>
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "constants/config.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <variant>
|
||||
#include <unordered_map>
|
||||
#include <shared_mutex>
|
||||
#include <esp_check.h>
|
||||
#include <nvs.h>
|
||||
|
||||
#include "esp_check.h"
|
||||
#include "nvs.h"
|
||||
#include "flatbuffers_generated/RobotModule_generated.h"
|
||||
|
||||
// Singleton to r/w config from the ESP32 nvs (thread safe and cached)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "esp_log.h"
|
||||
#include "DataLinkManager.h"
|
||||
#include "RMTManager.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
/**
|
||||
* @brief Construct a new Data Link Manager:: Data Link Manager object
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
#ifndef DATA_LINK
|
||||
#define DATA_LINK
|
||||
|
||||
#include "Frames.h"
|
||||
#include "Tables.h"
|
||||
#include <queue>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "esp_event.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
||||
#include <queue> //c++ priority queue
|
||||
#include <memory>
|
||||
#include "Frames.h"
|
||||
#include "Tables.h"
|
||||
#include "RMTManager.h"
|
||||
#include <unordered_map>
|
||||
|
||||
#define DEBUG_LINK_TAG "LinkLayer"
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#ifdef DATA_LINK
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include <variant>
|
||||
#include <cstdint>
|
||||
|
||||
#define BROADCAST_ADDR 0xFF //used for discovery (finding the board's neighbours). this will mean the board ids will have 2^8-2 = 254 unique IDs that could be assigned
|
||||
#define PC_ADDR 0x0 //setting 0 to be the PC
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#include "MPIMessageBuilder.h"
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
|
||||
namespace Flatbuffers {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#include "TopologyMessageBuilder.h"
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
|
||||
namespace Flatbuffers {
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
#ifndef ANGLECONTROLMESSAGEBUILDER_H_
|
||||
#define ANGLECONTROLMESSAGEBUILDER_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
#include "flatbuffers_generated/AngleControlMessage_generated.h"
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef MPIMESSAGEBUILDER_H
|
||||
#define MPIMESSAGEBUILDER_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef TOPOLOGYMESSAGEBUILDER_H
|
||||
#define TOPOLOGYMESSAGEBUILDER_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "RMTManager.h"
|
||||
|
||||
#include "RMTSymbols.h"
|
||||
#include "driver/rmt_tx.h"
|
||||
#include "driver/rmt_rx.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
#ifndef RMT_COMMUNICATIONS
|
||||
#define RMT_COMMUNICATIONS
|
||||
|
||||
#include "esp_event.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "esp_event.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "driver/rmt_tx.h"
|
||||
#include "driver/rmt_rx.h"
|
||||
|
||||
#include "soc/gpio_num.h"
|
||||
#include "RMTSymbols.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#define MAX_CHANNELS 4
|
||||
#define RMT_SYMBOL_BLOCK_SIZE 48
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
//
|
||||
|
||||
#include "MessagingInterface.h"
|
||||
|
||||
#include <AngleControlMessageBuilder.h>
|
||||
#include <ConfigManager.h>
|
||||
#include <freertos/queue.h>
|
||||
#include <freertos/semphr.h>
|
||||
|
||||
#include "AngleControlMessageBuilder.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "MPIMessageBuilder.h"
|
||||
|
||||
MessagingInterface::~MessagingInterface() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <esp_log.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "sys/param.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_event.h"
|
||||
|
||||
@@ -5,22 +5,18 @@
|
||||
#ifndef COMMUNICATIONROUTER_H
|
||||
#define COMMUNICATIONROUTER_H
|
||||
|
||||
#include <ConfigManager.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <chrono>
|
||||
#include <OrientationDetection.h>
|
||||
#include <WifiManager.h>
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "OrientationDetection.h"
|
||||
#include "WifiManager.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
||||
#include "TCPServer.h"
|
||||
#include "DataLinkManager.h"
|
||||
#include "constants/tcp.h"
|
||||
#include "constants/module.h"
|
||||
|
||||
#include "flatbuffers_generated/TopologyMessage_generated.h"
|
||||
|
||||
#include "PtrQueue.h"
|
||||
|
||||
class CommunicationRouter {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <constants/app_comms.h>
|
||||
|
||||
#include "constants/app_comms.h"
|
||||
#include "CommunicationRouter.h"
|
||||
|
||||
class MessagingInterface {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
#ifndef ORIENTATIONDETECTION_H
|
||||
#define ORIENTATIONDETECTION_H
|
||||
#include <flatbuffers_generated/RobotModule_generated.h>
|
||||
|
||||
#include "flatbuffers_generated/RobotModule_generated.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
class OrientationDetection {
|
||||
|
||||
@@ -10,16 +10,14 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
||||
#include "IRPCServer.h"
|
||||
|
||||
#include "PtrQueue.h"
|
||||
|
||||
class TCPServer : IRPCServer {
|
||||
class TCPServer final : IRPCServer {
|
||||
public:
|
||||
TCPServer(int port, const std::shared_ptr<PtrQueue<std::vector<uint8_t>>>& rx_queue);
|
||||
~TCPServer();
|
||||
int send_msg(char* buffer, uint32_t length) const;
|
||||
~TCPServer() override;
|
||||
int send_msg(char* buffer, uint32_t length) const override;
|
||||
|
||||
private:
|
||||
bool authenticate_client(int client_sock);
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#ifndef NETWORKMANAGER_H
|
||||
#define NETWORKMANAGER_H
|
||||
|
||||
#include <esp_netif_types.h>
|
||||
#include <esp_event.h>
|
||||
#include <esp_netif.h>
|
||||
#include <esp_wifi.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/semphr.h>
|
||||
|
||||
#include "esp_netif_types.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_netif.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "IWifiManager.h"
|
||||
|
||||
|
||||
@@ -2,20 +2,16 @@
|
||||
// Created by Johnathon Slightham on 2025-05-25.
|
||||
//
|
||||
|
||||
#include "mdns.h"
|
||||
|
||||
#include "ConfigManager.h"
|
||||
|
||||
#include "mDNSDiscoveryService.h"
|
||||
|
||||
#include "constants/tcp.h"
|
||||
|
||||
#include <string>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
// todo: clean this up (strange to be a constructor) also need to add more details, need to add to routing table
|
||||
#include "mdns.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "mDNSDiscoveryService.h"
|
||||
#include "constants/tcp.h"
|
||||
|
||||
void mDNSDiscoveryService::setup() {
|
||||
mdns_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user