fix: add logging to stopAllTasks for better debugging
This commit is contained in:
parent
d92c78f9d0
commit
d8756421a1
@ -13,10 +13,12 @@ const uint8_t ESP_MAGIC = 0xE9;
|
|||||||
|
|
||||||
void stopAllTasks() {
|
void stopAllTasks() {
|
||||||
// Stop all tasks
|
// Stop all tasks
|
||||||
|
Serial.println("Stopping all tasks");
|
||||||
vTaskSuspend(RfidReaderTask);
|
vTaskSuspend(RfidReaderTask);
|
||||||
vTaskSuspend(BambuMqttTask);
|
vTaskSuspend(BambuMqttTask);
|
||||||
vTaskSuspend(ScaleTask);
|
vTaskSuspend(ScaleTask);
|
||||||
//vTaskDelay(100 / portTICK_PERIOD_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
|
Serial.println("All tasks stopped");
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleOTAUpload(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
|
void handleOTAUpload(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
|
||||||
@ -29,6 +31,7 @@ void handleOTAUpload(AsyncWebServerRequest *request, String filename, size_t ind
|
|||||||
|
|
||||||
stopAllTasks();
|
stopAllTasks();
|
||||||
|
|
||||||
|
Serial.println("Start Main Upgrad Function");
|
||||||
if (!index) {
|
if (!index) {
|
||||||
// Reset static variables
|
// Reset static variables
|
||||||
if (spiffsBuffer) {
|
if (spiffsBuffer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user