Ver Fonte

Handle crash on corrupted model (#3220)

* Upgrade esp-tflite-micro to 1.3.1

* Added log message to hint in case it crashes on loading a corrupted model

---------

Co-authored-by: CaCO3 <caco@ruinelli.ch>
CaCO3 há 1 ano atrás
pai
commit
f39dacc1c5

+ 1 - 1
code/components/esp-tflite-micro

@@ -1 +1 @@
-Subproject commit 13f26b829405e9323e4212ffa954c261b1e21eeb
+Subproject commit 0032f1734e1e7b5fcf1b588cf1abb9ef53fed4c3

+ 1 - 0
code/components/jomjol_tfliteclass/CTfLiteClass.cpp

@@ -206,6 +206,7 @@ bool CTfLiteClass::MakeAllocate()
 
     LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "CTfLiteClass::MakeAllocate");
     this->interpreter = new tflite::MicroInterpreter(this->model, resolver, this->tensor_arena, this->kTensorArenaSize);
+    LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Trying to load the model. If it crashes here, it ist most likely due to a corrupted model!");
 
     if (this->interpreter) 
     {