diff --git a/code/espurna/config/progmem.h b/code/espurna/config/progmem.h index 1b8aaa35..3a53b2aa 100644 --- a/code/espurna/config/progmem.h +++ b/code/espurna/config/progmem.h @@ -2,6 +2,12 @@ // PROGMEM definitions //-------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------- +// Various strings +//-------------------------------------------------------------------------------- + +PROGMEM const char pstr_unknown[] = "UNKNOWN"; + //-------------------------------------------------------------------------------- // Reset reasons //-------------------------------------------------------------------------------- diff --git a/code/espurna/light.ino b/code/espurna/light.ino index 149a90c0..81cfd89a 100644 --- a/code/espurna/light.ino +++ b/code/espurna/light.ino @@ -196,7 +196,7 @@ void _lightApplyBrightnessColor() { } String lightDesc(unsigned char id) { - if (id >= _light_channel.size()) return F("UNKNOWN"); + if (id >= _light_channel.size()) return FPSTR(pstr_unknown); const char tag = pgm_read_byte(&_light_channel_desc[_light_channel.size() - 1][id]); switch (tag) { @@ -208,7 +208,7 @@ String lightDesc(unsigned char id) { default: break; } - return F("UNKNOWN"); + return FPSTR(pstr_unknown); } // -----------------------------------------------------------------------------