Remove name clash with compilation defines.

This commit is contained in:
Jonathan Naylor
2025-03-17 12:08:20 +00:00
parent 19ead93af9
commit 3e5a871287

View File

@@ -55,11 +55,11 @@ enum class SECTION {
POCSAG_NETWORK, POCSAG_NETWORK,
FM_NETWORK, FM_NETWORK,
AX25_NETWORK, AX25_NETWORK,
TFTSERIAL, TFTSERIAL_DISPLAY,
HD44780, HD44780_DISPLAY,
NEXTION, NEXTION_DISPLAY,
OLED, OLED_DISPLAY,
LCDPROC, LCDPROC_DISPLAY,
LOCK_FILE, LOCK_FILE,
REMOTE_CONTROL REMOTE_CONTROL
}; };
@@ -422,15 +422,15 @@ bool CConf::read()
else if (::strncmp(buffer, "[AX.25 Network]", 15U) == 0) else if (::strncmp(buffer, "[AX.25 Network]", 15U) == 0)
section = SECTION::AX25_NETWORK; section = SECTION::AX25_NETWORK;
else if (::strncmp(buffer, "[TFT Serial]", 12U) == 0) else if (::strncmp(buffer, "[TFT Serial]", 12U) == 0)
section = SECTION::TFTSERIAL; section = SECTION::TFTSERIAL_DISPLAY;
else if (::strncmp(buffer, "[HD44780]", 9U) == 0) else if (::strncmp(buffer, "[HD44780]", 9U) == 0)
section = SECTION::HD44780; section = SECTION::HD44780_DISPLAY;
else if (::strncmp(buffer, "[Nextion]", 9U) == 0) else if (::strncmp(buffer, "[Nextion]", 9U) == 0)
section = SECTION::NEXTION; section = SECTION::NEXTION_DISPLAY;
else if (::strncmp(buffer, "[OLED]", 6U) == 0) else if (::strncmp(buffer, "[OLED]", 6U) == 0)
section = SECTION::OLED; section = SECTION::OLED_DISPLAY;
else if (::strncmp(buffer, "[LCDproc]", 9U) == 0) else if (::strncmp(buffer, "[LCDproc]", 9U) == 0)
section = SECTION::LCDPROC; section = SECTION::LCDPROC_DISPLAY;
else if (::strncmp(buffer, "[Lock File]", 11U) == 0) else if (::strncmp(buffer, "[Lock File]", 11U) == 0)
section = SECTION::LOCK_FILE; section = SECTION::LOCK_FILE;
else if (::strncmp(buffer, "[Remote Control]", 16U) == 0) else if (::strncmp(buffer, "[Remote Control]", 16U) == 0)
@@ -1073,14 +1073,14 @@ bool CConf::read()
m_ax25NetworkSpeed = (unsigned int)::atoi(value); m_ax25NetworkSpeed = (unsigned int)::atoi(value);
else if (::strcmp(key, "Debug") == 0) else if (::strcmp(key, "Debug") == 0)
m_ax25NetworkDebug = ::atoi(value) == 1; m_ax25NetworkDebug = ::atoi(value) == 1;
} else if (section == SECTION::TFTSERIAL) { } else if (section == SECTION::TFTSERIAL_DISPLAY) {
if (::strcmp(key, "Port") == 0) if (::strcmp(key, "Port") == 0)
m_tftSerialPort = value; m_tftSerialPort = value;
else if (::strcmp(key, "Brightness") == 0) else if (::strcmp(key, "Brightness") == 0)
m_tftSerialBrightness = (unsigned int)::atoi(value); m_tftSerialBrightness = (unsigned int)::atoi(value);
else if (::strcmp(key, "ScreenLayout") == 0) else if (::strcmp(key, "ScreenLayout") == 0)
m_tftSerialScreenLayout = (unsigned int)::atoi(value); m_tftSerialScreenLayout = (unsigned int)::atoi(value);
} else if (section == SECTION::HD44780) { } else if (section == SECTION::HD44780_DISPLAY) {
if (::strcmp(key, "Rows") == 0) if (::strcmp(key, "Rows") == 0)
m_hd44780Rows = (unsigned int)::atoi(value); m_hd44780Rows = (unsigned int)::atoi(value);
else if (::strcmp(key, "Columns") == 0) else if (::strcmp(key, "Columns") == 0)
@@ -1107,7 +1107,7 @@ bool CConf::read()
p = ::strtok(nullptr, ",\r\n"); p = ::strtok(nullptr, ",\r\n");
} }
} }
} else if (section == SECTION::NEXTION) { } else if (section == SECTION::NEXTION_DISPLAY) {
if (::strcmp(key, "Port") == 0) if (::strcmp(key, "Port") == 0)
m_nextionPort = value; m_nextionPort = value;
else if (::strcmp(key, "Brightness") == 0) else if (::strcmp(key, "Brightness") == 0)
@@ -1126,7 +1126,7 @@ bool CConf::read()
m_nextionOutput = ::atoi(value) == 1; m_nextionOutput = ::atoi(value) == 1;
else if (::strcmp(key, "NextionUDPPort") == 0) else if (::strcmp(key, "NextionUDPPort") == 0)
m_nextionUDPPort = (unsigned short)::atoi(value); m_nextionUDPPort = (unsigned short)::atoi(value);
} else if (section == SECTION::OLED) { } else if (section == SECTION::OLED_DISPLAY) {
if (::strcmp(key, "Type") == 0) if (::strcmp(key, "Type") == 0)
m_oledType = (unsigned char)::atoi(value); m_oledType = (unsigned char)::atoi(value);
else if (::strcmp(key, "Brightness") == 0) else if (::strcmp(key, "Brightness") == 0)
@@ -1139,7 +1139,7 @@ bool CConf::read()
m_oledRotate = ::atoi(value) == 1; m_oledRotate = ::atoi(value) == 1;
else if (::strcmp(key, "LogoScreensaver") == 0) else if (::strcmp(key, "LogoScreensaver") == 0)
m_oledLogoScreensaver = ::atoi(value) == 1; m_oledLogoScreensaver = ::atoi(value) == 1;
} else if (section == SECTION::LCDPROC) { } else if (section == SECTION::LCDPROC_DISPLAY) {
if (::strcmp(key, "Address") == 0) if (::strcmp(key, "Address") == 0)
m_lcdprocAddress = value; m_lcdprocAddress = value;
else if (::strcmp(key, "Port") == 0) else if (::strcmp(key, "Port") == 0)