mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-16 23:31:04 +01:00
Hoymiles Lib: Remove hard coded Serial output
The serial port for output of debug information can now changed during runtime
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2022 Thomas Basler and others
|
||||
*/
|
||||
#include "AlarmLogParser.h"
|
||||
#include "../Hoymiles.h"
|
||||
#include <cstring>
|
||||
|
||||
void AlarmLogParser::clearBuffer()
|
||||
@@ -14,7 +15,7 @@ void AlarmLogParser::clearBuffer()
|
||||
void AlarmLogParser::appendFragment(uint8_t offset, uint8_t* payload, uint8_t len)
|
||||
{
|
||||
if (offset + len > ALARM_LOG_PAYLOAD_SIZE) {
|
||||
Serial.printf("FATAL: (%s, %d) stats packet too large for buffer (%d > %d)\n", __FILE__, __LINE__, offset + len, ALARM_LOG_PAYLOAD_SIZE);
|
||||
Hoymiles.getMessageOutput()->printf("FATAL: (%s, %d) stats packet too large for buffer (%d > %d)\n", __FILE__, __LINE__, offset + len, ALARM_LOG_PAYLOAD_SIZE);
|
||||
return;
|
||||
}
|
||||
memcpy(&_payloadAlarmLog[offset], payload, len);
|
||||
|
||||
Reference in New Issue
Block a user