Added separate config section for DMR TG Rewrite

This commit is contained in:
Simon 2016-09-18 21:59:05 +01:00
parent 40a9a2c562
commit 0fa117969e
2 changed files with 15 additions and 6 deletions

View file

@ -203,6 +203,8 @@ bool CConf::read()
section = SECTION_NEXTION; section = SECTION_NEXTION;
else if (::strncmp(buffer, "[OLED]", 6U) == 0) else if (::strncmp(buffer, "[OLED]", 6U) == 0)
section = SECTION_OLED; section = SECTION_OLED;
else if (::strncmp(buffer, "[DMR TG Rewirte]", 16U) == 0)
section = SECTION_TGREWRITE
else else
section = SECTION_NONE; section = SECTION_NONE;
@ -332,10 +334,6 @@ bool CConf::read()
m_dmrColorCode = (unsigned int)::atoi(value); m_dmrColorCode = (unsigned int)::atoi(value);
else if (::strcmp(key, "SelfOnly") == 0) else if (::strcmp(key, "SelfOnly") == 0)
m_dmrSelfOnly = ::atoi(value) == 1; m_dmrSelfOnly = ::atoi(value) == 1;
else if (::strcmp(key, "TGRewriteSlot1") == 0)
m_TGRewriteSlot1 = ::atoi(value) == 1;
else if (::strcmp(key, "TGRewriteSlot2") == 0)
m_TGRewriteSlot2 = ::atoi(value) == 1;
else if (::strcmp(key, "Prefixes") == 0) { else if (::strcmp(key, "Prefixes") == 0) {
char* p = ::strtok(value, ",\r\n"); char* p = ::strtok(value, ",\r\n");
while (p != NULL) { while (p != NULL) {
@ -520,6 +518,11 @@ bool CConf::read()
m_oledBrightness = (unsigned char)::atoi(value); m_oledBrightness = (unsigned char)::atoi(value);
else if (::strcmp(key, "Brightness") == 0) else if (::strcmp(key, "Brightness") == 0)
m_oledInvert = (unsigned char)::atoi(value); m_oledInvert = (unsigned char)::atoi(value);
} else if (section == SECTION_TGREWRITE) {
if (::strcmp(key, "TGRewriteSlot1") == 0)
m_TGRewriteSlot1 = ::atoi(value) == 1;
else if (::strcmp(key, "TGRewriteSlot2") == 0)
m_TGRewriteSlot2 = ::atoi(value) == 1;
} }
} }

View file

@ -63,8 +63,6 @@ SelfOnly=0
LookupFile=DMRIds.dat LookupFile=DMRIds.dat
CallHang=3 CallHang=3
TXHang=4 TXHang=4
#TGRewriteSlot1=0
#TGReWriteSlot2=0
#Blacklist= #Blacklist=
#DstIdBlackListSlot1RF= #DstIdBlackListSlot1RF=
#DstIdBlackListSlot2RF= #DstIdBlackListSlot2RF=
@ -75,6 +73,14 @@ TXHang=4
#DstIdWhiteListSlot1NET= #DstIdWhiteListSlot1NET=
#DstIdWhiteListSlot2NET= #DstIdWhiteListSlot2NET=
[DMR TG Rewrite]
TGRewriteSlot1=0
TGReWriteSlot2=0
BMAutoRewrite=0
RewriteReflectorVoicePrompts=0
DirectDial=0
TargetTG=9
[System Fusion] [System Fusion]
Enable=1 Enable=1