Merge remote-tracking branch 'origin/master' into enhanced_device

# Conflicts:
#	docs/enhanced_proto.md
#	src/ebusd/bushandler.cpp
#	src/lib/ebus/device.cpp
#	src/lib/ebus/device.h
This commit is contained in:
John
2021-01-10 13:51:53 +01:00
18 changed files with 96 additions and 100 deletions
-3
View File
@@ -175,9 +175,6 @@ void closeLogFile() {
}
bool needsLog(const LogFacility facility, const LogLevel level) {
if (s_logFile == nullptr && !s_useSyslog) {
return false;
}
return s_facilityLogLevel[facility] >= level;
}
-16
View File
@@ -50,22 +50,6 @@ bool RotateFile::setEnabled(bool enabled) {
if (enabled) {
m_stream = fopen(m_fileName.c_str(), m_textMode ? "w" : "wb");
m_fileSize = 0;
#ifdef FORWARD_RAW_TTY
if (!m_textMode && isatty(fileno(m_stream)) == 1) {
int fd = fileno(m_stream);
struct termios newSettings;
memset(&newSettings, 0, sizeof(newSettings));
cfsetspeed(&newSettings, B2400);
newSettings.c_cflag |= (CS8 | CLOCAL);
newSettings.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // non-canonical mode
newSettings.c_iflag |= IGNPAR; // ignore parity errors
newSettings.c_oflag &= ~OPOST;
// activate new settings of serial device
tcsetattr(fd, TCSANOW, &newSettings);
}
#endif
}
return true;
}