Add vendor and filament management to API; implement recycling factory handling in NFC
This commit is contained in:
15
src/api.h
15
src/api.h
@@ -17,7 +17,10 @@ typedef enum {
|
||||
API_REQUEST_BAMBU_UPDATE,
|
||||
API_REQUEST_SPOOL_TAG_ID_UPDATE,
|
||||
API_REQUEST_SPOOL_WEIGHT_UPDATE,
|
||||
API_REQUEST_SPOOL_LOCATION_UPDATE
|
||||
API_REQUEST_SPOOL_LOCATION_UPDATE,
|
||||
API_REQUEST_VENDOR_CREATE,
|
||||
API_REQUEST_VENDOR_CHECK,
|
||||
API_REQUEST_FILAMENT_CHECK
|
||||
} SpoolmanApiRequestType;
|
||||
|
||||
extern volatile spoolmanApiStateType spoolmanApiState;
|
||||
@@ -27,6 +30,9 @@ extern bool octoEnabled;
|
||||
extern bool sendOctoUpdate;
|
||||
extern String octoUrl;
|
||||
extern String octoToken;
|
||||
extern uint16_t createdVendorId; // ID of newly created vendor
|
||||
extern uint16_t foundVendorId; // ID of found vendor
|
||||
extern uint16_t foundFilamentId; // ID of found filament
|
||||
extern bool spoolmanConnected;
|
||||
|
||||
bool checkSpoolmanInstance(const String& url);
|
||||
@@ -40,5 +46,12 @@ uint8_t updateSpoolLocation(String spoolId, String location);
|
||||
bool initSpoolman(); // Neue Funktion zum Initialisieren von Spoolman
|
||||
bool updateSpoolBambuData(String payload); // Neue Funktion zum Aktualisieren der Bambu-Daten
|
||||
bool updateSpoolOcto(int spoolId); // Neue Funktion zum Aktualisieren der Octo-Daten
|
||||
uint16_t checkVendor(String vendor); // Check if vendor exists, return ID
|
||||
uint16_t createVendor(String vendor); // Create vendor, return ID
|
||||
uint16_t checkFilament(); // Check if filament exists, return ID
|
||||
bool createFilament(); // Create filament
|
||||
uint16_t checkSpool(); // Check if spool exists, return ID
|
||||
bool createSpool(); // Create spool
|
||||
void createFilamentFabrik(JsonDocument payload);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user