/** * @file outputBufMqtt.cpp * @author Alexander Klein (alex@kleiax.de) * @brief Contains the implementation of the class OutputBufMqtt * @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(c), getloc()); this->debugMqtt->addCharacter((char) c); Serial.print((char) c); // if (putchar(c) == EOF) { // return EOF; // } } return c; }