mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
added renderer for char strings, like the boiler's service code text
This commit is contained in:
@@ -134,6 +134,12 @@ char * Helpers::render_boolean(char * result, bool value) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// render for native char strings
|
||||
char * Helpers::render_value(char * result, const char * value, uint8_t format) {
|
||||
strcpy(result, value);
|
||||
return result;
|
||||
}
|
||||
|
||||
// convert unsigned int (single byte) to text value and returns it
|
||||
// format: 255(0xFF)=boolean, 0=no formatting, otherwise divide by format
|
||||
char * Helpers::render_value(char * result, uint8_t value, uint8_t format) {
|
||||
|
||||
Reference in New Issue
Block a user