Finish documention until someone change something

This commit is contained in:
2022-02-15 20:12:50 +01:00
parent 3a2e51713b
commit c8e3344b27
50 changed files with 991 additions and 223 deletions
+5 -3
View File
@@ -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;