From 45e651c6780d3096c84a8f45368a039c3665b121 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 9 Oct 2023 17:21:09 +0100 Subject: [PATCH] Fix the OLED driver. --- OLED.cpp | 10 +++++----- OLED.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OLED.cpp b/OLED.cpp index 57a2b2eb..da7d91d2 100644 --- a/OLED.cpp +++ b/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); diff --git a/OLED.h b/OLED.h index b782b5c2..cff1dd21 100644 --- a/OLED.h +++ b/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();