diff --git a/inputparser.cpp b/inputparser.cpp index 59fbe6c..305fa58 100644 --- a/inputparser.cpp +++ b/inputparser.cpp @@ -30,4 +30,4 @@ bool InputParser::cmdOptionExists(const std::string &option) const { != this->tokens.end(); } -std::vector tokens; \ No newline at end of file +std::vector tokens; diff --git a/inputparser.h b/inputparser.h index 078e9aa..4e3cb4b 100644 --- a/inputparser.h +++ b/inputparser.h @@ -14,4 +14,4 @@ class InputParser { bool cmdOptionExists(const std::string &option) const; }; -#endif // ___INPUTPARSER_H \ No newline at end of file +#endif // ___INPUTPARSER_H diff --git a/inverter.conf b/inverter.conf index 709f642..acdc588 100644 --- a/inverter.conf +++ b/inverter.conf @@ -22,11 +22,11 @@ amperage_factor=1.0 # reading compared to measurement tools. Normally this will remain '1' watt_factor=1.01 -# Depending on the protocol version used and your device, +# Depending on the protocol version used and your device, # you might need to change the following parameters #### For Axpert VM3 inverter like, use those values ### -# This allows you to modify the buffersize for the qpiri command +# This allows you to modify the buffersize for the qpiri command qpiri=98 # This allows you to modify the buffersize for the qpiws command diff --git a/inverter.cpp b/inverter.cpp index ce3dd5e..37acaac 100644 --- a/inverter.cpp +++ b/inverter.cpp @@ -86,11 +86,11 @@ bool cInverter::query(const char *cmd) { cfsetspeed(&settings, baud); // baud rate settings.c_cflag &= ~PARENB; // no parity settings.c_cflag &= ~CSTOPB; // 1 stop bit - settings.c_cflag &= ~CSIZE; // Clear all bits that set the data size + settings.c_cflag &= ~CSIZE; // Clear all bits that set the data size settings.c_cflag |= CS8 | CLOCAL; // 8 bits settings.c_oflag &= ~OPOST; // Prevent special interpretation of output bytes (e.g. newline chars) - settings.c_lflag &= ~ICANON; + settings.c_lflag &= ~ICANON; settings.c_iflag &= ~(IXON | IXOFF | IXANY); // Turn off s/w flow ctrl settings.c_lflag &= ~ISIG; settings.c_oflag &= ~ONLCR; // Prevent conversion of newline to carriage return/line feed @@ -135,7 +135,7 @@ bool cInverter::query(const char *cmd) { if (buf[j] == 0x0d){ reading = false; replysize = j+1; - printf("INVERTER: stop byte detected, buffersize might be %d for %s ", replysize, cmd); + lprintf("INVERTER: stop byte detected, buffersize might be %d for %s ", replysize, cmd); break; } } diff --git a/inverter.h b/inverter.h index 67091b0..17f09e5 100644 --- a/inverter.h +++ b/inverter.h @@ -5,6 +5,8 @@ #include #include +#include + using namespace std; class cInverter {