Skip to content

Commit

Permalink
Fix the OLED driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Oct 9, 2023
1 parent 45821b1 commit 45e651c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion OLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 45e651c

Please sign in to comment.