2025-02-12 21:10:25 +01:00
|
|
|
#ifndef API_H
|
|
|
|
#define API_H
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <ESPAsyncWebServer.h> // Include for AsyncWebServerRequest
|
|
|
|
#include "website.h"
|
|
|
|
#include "display.h"
|
|
|
|
#include <ArduinoJson.h>
|
|
|
|
|
|
|
|
extern bool spoolman_connected;
|
|
|
|
extern String spoolmanUrl;
|
|
|
|
|
|
|
|
bool checkSpoolmanInstance(const String& url);
|
|
|
|
bool saveSpoolmanUrl(const String& url);
|
|
|
|
String loadSpoolmanUrl(); // Neue Funktion zum Laden der URL
|
|
|
|
bool checkSpoolmanExtraFields(); // Neue Funktion zum Überprüfen der Extrafelder
|
|
|
|
JsonDocument fetchSpoolsForWebsite(); // API-Funktion für die Webseite
|
|
|
|
JsonDocument fetchAllSpoolsInfo();
|
|
|
|
void sendAmsData(AsyncWebSocketClient *client); // Neue Funktion zum Senden von AMS-Daten
|
2025-02-17 14:44:38 +01:00
|
|
|
bool updateSpoolTagId(String uidString, const char* payload); // Neue Funktion zum Aktualisieren eines Spools
|
2025-02-12 21:10:25 +01:00
|
|
|
uint8_t updateSpoolWeight(String spoolId, uint16_t weight); // Neue Funktion zum Aktualisieren des Gewichts
|
|
|
|
bool initSpoolman(); // Neue Funktion zum Initialisieren von Spoolman
|
|
|
|
|
|
|
|
#endif
|