Исправлены ошибки режима Избранное и эффекта "Белый свет"; Оптимизация использования памяти

This commit is contained in:
gunner47
2019-09-05 23:26:03 +03:00
parent 763770d72f
commit 2d5a709116
11 changed files with 258 additions and 239 deletions

View File

@@ -90,7 +90,7 @@ class FavoritesManager
nextModeAt = getNexTime();
#ifdef GENERAL_DEBUG
Serial.printf("Переключение на следующий избранный режим: %d\n\n", (*currentMode));
Serial.printf_P(PSTR("Переключение на следующий избранный режим: %d\n\n"), (*currentMode));
#endif
return true;
@@ -136,7 +136,7 @@ class FavoritesManager
static bool isStatusTextCorrect(const char* statusText) // валидирует statusText (проверяет, правильное ли коичество компонентов он содержит)
{
char buff[128];
char buff[MAX_UDP_BUFFER_SIZE];
strcpy(buff, statusText);
uint8_t lexCount = 0;
@@ -208,7 +208,7 @@ class FavoritesManager
return NULL;
}
const uint8_t buffSize = 128;
const uint8_t buffSize = MAX_UDP_BUFFER_SIZE;
char buff[buffSize];
memset(buff, 0, buffSize);
strcpy(buff, statusText);