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 LeeuwenandOtto winter authored and GitHub committed 2021-09-13 09:48:52 +02:00
1 parent e18dfdd656
commit d594a6fcbc
25 files changed
+241 -251

No files matched your search

+4 -4
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("");
}
}