Store strings only used for logging in flash (#2274)

Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
Oxan van Leeuwen
2021-09-13 09:48:52 +02:00
committed by GitHub
parent e18dfdd656
commit d594a6fcbc
25 changed files with 241 additions and 251 deletions

View File

@@ -6,15 +6,15 @@ namespace sensor {
static const char *const TAG = "sensor";
const char *state_class_to_string(StateClass state_class) {
const LogString *state_class_to_string(StateClass state_class) {
switch (state_class) {
case STATE_CLASS_MEASUREMENT:
return "measurement";
return LOG_STR("measurement");
case STATE_CLASS_TOTAL_INCREASING:
return "total_increasing";
return LOG_STR("total_increasing");
case STATE_CLASS_NONE:
default:
return "";
return LOG_STR("");
}
}