mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-27 04:35:40 +08:00
Start making the OLED driver available for modem redirection.
This commit is contained in:
16
Display.cpp
16
Display.cpp
@@ -27,16 +27,13 @@
|
||||
#include "CASTInfo.h"
|
||||
#include "Conf.h"
|
||||
#include "Modem.h"
|
||||
#include "OLED.h"
|
||||
#include "Log.h"
|
||||
|
||||
#if defined(HD44780)
|
||||
#include "HD44780.h"
|
||||
#endif
|
||||
|
||||
#if defined(OLED)
|
||||
#include "OLED.h"
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@@ -668,21 +665,18 @@ CDisplay* CDisplay::createDisplay(const CConf& conf, IModem* modem)
|
||||
display = new CHD44780(rows, columns, conf.getCallsign(), dmrid, pins, i2cAddress, pwm, pwmPin, pwmBright, pwmDim, displayClock, utc, conf.getDuplex());
|
||||
}
|
||||
#endif
|
||||
#if defined(OLED)
|
||||
} else if (type == "OLED") {
|
||||
unsigned char type = conf.getOLEDType();
|
||||
unsigned char brightness = conf.getOLEDBrightness();
|
||||
bool invert = conf.getOLEDInvert();
|
||||
bool scroll = conf.getOLEDScroll();
|
||||
unsigned char type = conf.getOLEDType();
|
||||
unsigned char brightness = conf.getOLEDBrightness();
|
||||
bool invert = conf.getOLEDInvert();
|
||||
bool scroll = conf.getOLEDScroll();
|
||||
bool rotate = conf.getOLEDRotate();
|
||||
bool logosaver = conf.getOLEDLogoScreensaver();
|
||||
|
||||
display = new COLED(type, brightness, invert, scroll, rotate, logosaver, conf.getDMRNetworkSlot1(), conf.getDMRNetworkSlot2());
|
||||
#endif
|
||||
} else if (type == "CAST") {
|
||||
display = new CCASTInfo(modem);
|
||||
} else {
|
||||
LogWarning("No valid display found, disabling");
|
||||
display = new CNullDisplay;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user