Skip to content

Commit

Permalink
Optimize AlarmLogParser to save memory
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Dec 9, 2023
1 parent 00bc631 commit 0737cb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Hoymiles/src/parser/AlarmLogParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ enum class AlarmMessageLocale_t {
typedef struct {
AlarmMessageType_t InverterType;
uint16_t MessageId;
char Message_en[62];
char Message_de[63];
char Message_fr[64];
const char* Message_en;
const char* Message_de;
const char* Message_fr;
} AlarmMessage_t;

class AlarmLogParser : public Parser {
Expand All @@ -52,7 +52,7 @@ class AlarmLogParser : public Parser {

private:
static int getTimezoneOffset();
String getLocaleMessage(const AlarmMessage_t *msg, AlarmMessageLocale_t locale);
String getLocaleMessage(const AlarmMessage_t* msg, AlarmMessageLocale_t locale);

uint8_t _payloadAlarmLog[ALARM_LOG_PAYLOAD_SIZE];
uint8_t _alarmLogLength = 0;
Expand Down

0 comments on commit 0737cb0

Please sign in to comment.