Finish documention until someone change something
This commit is contained in:
@@ -18,9 +18,11 @@ char DebugMqtt::msg[MQTT_BUFFER_SIZE];
|
||||
char DebugMqtt::topic[MQTT_BUFFER_SIZE];
|
||||
|
||||
|
||||
DebugMqtt::DebugMqtt(const char* name) {
|
||||
DebugMqtt::DebugMqtt(const char* name, uint8_t bufSize) {
|
||||
this->name = name;
|
||||
this->buf = new char[this->bufSitze];
|
||||
if (bufSize != 0)
|
||||
this->bufSize = bufSize;
|
||||
this->buf = new char[this->bufSize];
|
||||
}
|
||||
|
||||
DebugMqtt::~DebugMqtt() {
|
||||
@@ -62,7 +64,7 @@ void DebugMqtt::writeToInflux(String measurement_name, String field_set, float m
|
||||
void DebugMqtt::addCharacter(char c) {
|
||||
this->buf[this->bufPos] = c;
|
||||
this->bufPos++;
|
||||
if (c == '\n' || this->bufPos >= this->bufSitze - 1) {
|
||||
if (c == '\n' || this->bufPos >= this->bufSize - 1) {
|
||||
this->buf[this->bufPos - 1] = '\0';
|
||||
this->sendMsg(Loglevel::info, buf);
|
||||
this->bufPos = 0;
|
||||
|
||||
Reference in New Issue
Block a user