merged old Esp Verison with better FileManagement

This commit is contained in:
2026-10-23 23:38:20 +02:00
parent c7b8c89c2d
commit 893dfd419e
14 changed files with 153 additions and 383 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef BOTMANAGER_H
#define BOTMANAGER_H
#include <WiFi.h>
#include <WiFiUdp.h>
#include "Protocol.h"
#include "MotionController.h" // Needed for pointers
#include "DisplayManager.h" // Needed for pointers
class BotNetwork {
public:
BotNetwork(const char* ssid, const char* pass, const char* ap_ssid, const char* ap_pass);
bool begin(uint16_t port); // Returns true if WiFi, false if AP
int readPacket(uint8_t* buffer, size_t maxSize);
void parsePacket(uint8_t *buffer, size_t size, MotionController* motion, DisplayManager* display);
private:
const char* _ssid;
const char* _pass;
const char* _ap_ssid;
const char* _ap_pass;
WiFiUDP _udp;
};
#endif