From 528a220afbec538a16512e6b4b88191cb5f7a440 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 22 Jun 2016 12:14:22 +0200 Subject: [PATCH] Add date separator settings for HD44780 to Conf --- Conf.cpp | 3 +++ Conf.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Conf.cpp b/Conf.cpp index b9c922c..9a8b3a8 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -135,6 +135,7 @@ m_hd44780PWMBright(), m_hd44780PWMDim(), m_hd44780DisplayClock(false), m_hd44780UTC(false), +m_hd44780DateFormat("English"), m_nextionPort("/dev/ttyAMA0"), m_nextionBrightness(50U), m_nextionDisplayClock(false), @@ -445,6 +446,8 @@ bool CConf::read() m_hd44780DisplayClock = ::atoi(value) == 1; else if (::strcmp(key, "UTC") == 0) m_hd44780UTC = ::atoi(value) == 1; + else if (::strcmp(key, "DateFormat") == 0) + m_hd44780DateFormat = value; else if (::strcmp(key, "Pins") == 0) { char* p = ::strtok(value, ",\r\n"); while (p != NULL) { diff --git a/Conf.h b/Conf.h index bb233e9..3fb3f19 100644 --- a/Conf.h +++ b/Conf.h @@ -142,6 +142,7 @@ public: unsigned int getHD44780PWMDim() const; bool getHD44780DisplayClock() const; bool getHD44780UTC() const; + std::string getHD44780DateFormat() const; // The Nextion section std::string getNextionPort() const; @@ -256,6 +257,7 @@ private: unsigned int m_hd44780PWMDim; bool m_hd44780DisplayClock; bool m_hd44780UTC; + std::string m_hd44780DateFormat; std::string m_nextionPort; unsigned int m_nextionBrightness;