added log level to logfile, adjusted some loglevels

This commit is contained in:
George Ruinelli
2022-10-22 18:05:08 +02:00
parent 0a2b6b71ca
commit 1e698440f9
22 changed files with 138 additions and 114 deletions

View File

@@ -67,7 +67,7 @@ bool CFindTemplate::FindTemplate(RefInfo *_ref)
if (isSimilar)
{
#ifdef DEBUG_DETAIL_ON
LogFile.WriteToFile("Use FastAlignment sucessfull");
LogFile.WriteToFile(ESP_LOG_INFO, "Use FastAlignment sucessfull");
#endif
_ref->found_x = _ref->fastalg_x;
_ref->found_y = _ref->fastalg_y;

View File

@@ -362,11 +362,8 @@ void CImageBasis::LoadFromMemory(stbi_uc *_buffer, int len)
ESP_LOGD(TAG, "Image loaded from memory: %d, %d, %d", width, height, channels);
if ((width * height * channels) == 0)
{
ESP_LOGE(TAG, "Image with size 0 loaded --> reboot to be done! "
"Check that your camera module is working and connected properly.");
LogFile.SwitchOnOff(true);
LogFile.WriteToFile("Image with size 0 loaded --> reboot to be done! "
LogFile.WriteToFile(ESP_LOG_ERROR, "Image with size 0 loaded --> reboot to be done! "
"Check that your camera module is working and connected properly.");
doReboot();