mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-20 22:45:44 +08:00
Fix the OLED driver.
This commit is contained in:
10
OLED.cpp
10
OLED.cpp
@@ -247,7 +247,7 @@ bool COLED::open()
|
||||
return true;
|
||||
}
|
||||
|
||||
float COLED::readTemperature(const std::string& filePath)
|
||||
float COLED::readTemperature(const char* filePath)
|
||||
{
|
||||
std::ifstream file(filePath);
|
||||
if (!file.is_open()) {
|
||||
@@ -454,7 +454,7 @@ void COLED::clearDStarInt()
|
||||
|
||||
void COLED::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
|
||||
{
|
||||
CUserDB entry tmp;
|
||||
CUserDBentry tmp;
|
||||
|
||||
tmp.set(keyCALLSIGN, src);
|
||||
|
||||
@@ -479,13 +479,13 @@ int COLED::writeDMRIntEx(unsigned int slotNo, const CUserDBentry& src, bool grou
|
||||
m_display.setCursor(0, OLED_LINE2);
|
||||
m_display.printf("%s", CALLandNAME(src).c_str());
|
||||
m_display.setCursor(0, OLED_LINE3);
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type.c_str(), group ? "TG: " : "", dst.c_str());
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type, group ? "TG: " : "", dst.c_str());
|
||||
} else {
|
||||
m_display.fillRect(0, OLED_LINE4, m_display.width(), 40, BLACK);
|
||||
m_display.setCursor(0, OLED_LINE4);
|
||||
m_display.printf("%s", CALLandNAME(src).c_str());
|
||||
m_display.setCursor(0, OLED_LINE5);
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type.c_str(), group ? "TG: " : "", dst.c_str());
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type, group ? "TG: " : "", dst.c_str());
|
||||
}
|
||||
|
||||
m_display.fillRect(0, OLED_LINE6, m_display.width(), 20, BLACK);
|
||||
@@ -496,7 +496,7 @@ int COLED::writeDMRIntEx(unsigned int slotNo, const CUserDBentry& src, bool grou
|
||||
m_display.setCursor(0, OLED_LINE2);
|
||||
m_display.printf("%s", CALLandNAME(src).c_str());
|
||||
m_display.setCursor(0, OLED_LINE3);
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type.c_str(), group ? "TG: " : "", dst.c_str());
|
||||
m_display.printf("Slot: %i %s %s%s", slotNo, type, group ? "TG: " : "", dst.c_str());
|
||||
m_display.setCursor(0, OLED_LINE4);
|
||||
m_display.printf("%s", src.get(keyCITY).c_str());
|
||||
m_display.setCursor(0, OLED_LINE5);
|
||||
|
||||
2
OLED.h
2
OLED.h
@@ -45,7 +45,7 @@
|
||||
class COLED : public CDisplay
|
||||
{
|
||||
public:
|
||||
COLED(char displayType, unsigned char displayBrighness, bool displayInvert, bool displayScroll, bool displayRotate, bool displayLogoScreensaver, bool duplex);
|
||||
COLED(unsigned char displayType, unsigned char displayBrighness, bool displayInvert, bool displayScroll, bool displayRotate, bool displayLogoScreensaver, bool duplex);
|
||||
virtual ~COLED();
|
||||
|
||||
virtual bool open();
|
||||
|
||||
Reference in New Issue
Block a user