feat: add display delay for vendor, filament, and spool creation processes
This commit is contained in:
11
src/api.cpp
11
src/api.cpp
@@ -654,6 +654,9 @@ uint16_t createVendor(String vendor) {
|
||||
|
||||
vendorDoc.clear();
|
||||
|
||||
// Delay for Display Bar
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
// Wait for task completion and return the created vendor ID
|
||||
// Note: createdVendorId will be set by sendToApi when response is received
|
||||
while(createdVendorId == 65535) {
|
||||
@@ -806,6 +809,9 @@ uint16_t createFilament(uint16_t vendorId, const JsonDocument& payload) {
|
||||
|
||||
filamentDoc.clear();
|
||||
|
||||
// Delay for Display Bar
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
// Wait for task completion and return the created filament ID
|
||||
// Note: createdFilamentId will be set by sendToApi when response is received
|
||||
while(createdFilamentId == 65535) {
|
||||
@@ -948,7 +954,10 @@ uint16_t createSpool(uint16_t vendorId, uint16_t filamentId, JsonDocument& paylo
|
||||
optimizedPayload.clear();
|
||||
|
||||
nfcReaderState = NFC_IDLE;
|
||||
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||
|
||||
// Delay for Display Bar
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
|
||||
startWriteJsonToTag(true, payloadString.c_str());
|
||||
|
||||
return createdSpoolId;
|
||||
|
@@ -48,9 +48,6 @@ void scale_loop(void * parameter) {
|
||||
Serial.println("Scale Loop started");
|
||||
Serial.println("++++++++++++++++++++++++++++++");
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
scale_tare_counter = 10; // damit beim Starten der Waage automatisch getart wird
|
||||
|
||||
for(;;) {
|
||||
if (scale.is_ready())
|
||||
{
|
||||
@@ -120,12 +117,13 @@ void start_scale(bool touchSensorConnected) {
|
||||
esp_task_wdt_reset();
|
||||
}
|
||||
|
||||
if (scale.wait_ready_timeout(1000))
|
||||
{
|
||||
scale.set_scale(calibrationValue); // this value is obtained by calibrating the scale with known weights; see the README for details
|
||||
//scale.tare();
|
||||
while(!scale.is_ready()) {
|
||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
||||
}
|
||||
|
||||
scale.set_scale(calibrationValue); // this value is obtained by calibrating the scale with known weights; see the README for details
|
||||
scale.tare();
|
||||
|
||||
// Display Gewicht
|
||||
oledShowWeight(0);
|
||||
|
||||
|
Reference in New Issue
Block a user