added duplicate console to mqtt
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file outputStreamMqtt.cpp
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-02-14
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include "outputBufMqtt.h"
|
||||
|
||||
OutputBufMqtt::OutputBufMqtt(DebugMqtt* debugMqtt)
|
||||
: std::streambuf() {
|
||||
this->debugMqtt = debugMqtt;
|
||||
}
|
||||
|
||||
std::streambuf::int_type OutputBufMqtt::overflow(std::streambuf::int_type c) {
|
||||
if (c != EOF) {
|
||||
// c = std::toupper(static_cast<char>(c), getloc());
|
||||
|
||||
this->debugMqtt->addCharacter((char) c);
|
||||
Serial.print((char) c);
|
||||
// if (putchar(c) == EOF) {
|
||||
// return EOF;
|
||||
// }
|
||||
}
|
||||
return c;
|
||||
}
|
||||
Reference in New Issue
Block a user