mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
HD44780 PWM backlight control
This commit is contained in:
@@ -568,9 +568,15 @@ void CMMDVMHost::readParams()
|
||||
|
||||
void CMMDVMHost::createDisplay()
|
||||
{
|
||||
std::string type = m_conf.getDisplay();
|
||||
std::string callsign = m_conf.getCallsign();
|
||||
unsigned int dmrid = m_conf.getDMRId();
|
||||
std::string type = m_conf.getDisplay();
|
||||
std::string callsign = m_conf.getCallsign();
|
||||
unsigned int dmrid = m_conf.getDMRId();
|
||||
|
||||
// WFV
|
||||
unsigned int PWM = m_conf.getHD44780PWM();
|
||||
unsigned int PWMPin = m_conf.getHD44780PWMPin();
|
||||
unsigned int PWMBright = m_conf.getHD44780PWMBright();
|
||||
unsigned int PWMDim = m_conf.getHD44780PWMDim();
|
||||
|
||||
LogInfo("Display Parameters");
|
||||
LogInfo(" Type: %s", type.c_str());
|
||||
@@ -604,7 +610,15 @@ void CMMDVMHost::createDisplay()
|
||||
LogInfo(" Columns: %u", columns);
|
||||
LogInfo(" Pins: %u,%u,%u,%u,%u,%u", pins.at(0U), pins.at(1U), pins.at(2U), pins.at(3U), pins.at(4U), pins.at(5U));
|
||||
|
||||
m_display = new CHD44780(rows, columns, callsign, dmrid, pins);
|
||||
// WFV
|
||||
if (PWM == 1U) {
|
||||
LogInfo("PWM Brightness Control Enabled");
|
||||
LogInfo(" PWM Pin: %u", PWMPin);
|
||||
LogInfo(" PWM Bright: %u", PWMBright);
|
||||
LogInfo(" PWM Dim: %u", PWMDim);
|
||||
}
|
||||
|
||||
m_display = new CHD44780(rows, columns, callsign, dmrid, pins, PWM, PWMPin, PWMBright, PWMDim);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user