mirror of
https://github.com/g4klx/DMRGateway.git
synced 2026-04-08 07:53:46 +00:00
Fix: XLX ID as 3 characters string instead of a number.
* Since some XLX reflectors are using characters instead of numbers (like USA,JPN,etc...), it's not possible to use them as startup reflector. * Of course, it's still not possible to switch to that kind of reflector using the xlxBase + 4000 trick. Update Copyright year.
This commit is contained in:
parent
518c2a6136
commit
4f9f30b678
8 changed files with 59 additions and 49 deletions
11
XLXVoice.cpp
11
XLXVoice.cpp
|
|
@ -130,11 +130,8 @@ bool CXLXVoice::open()
|
|||
return true;
|
||||
}
|
||||
|
||||
void CXLXVoice::linkedTo(unsigned int number, unsigned int room)
|
||||
void CXLXVoice::linkedTo(const std::string &number, unsigned int room)
|
||||
{
|
||||
char letters[10U];
|
||||
::sprintf(letters, "%03u", number);
|
||||
|
||||
std::vector<std::string> words;
|
||||
if (m_positions.count("linkedto") == 0U) {
|
||||
words.push_back("linked");
|
||||
|
|
@ -145,9 +142,9 @@ void CXLXVoice::linkedTo(unsigned int number, unsigned int room)
|
|||
words.push_back("X");
|
||||
words.push_back("L");
|
||||
words.push_back("X");
|
||||
words.push_back(std::string(1U, letters[0U]));
|
||||
words.push_back(std::string(1U, letters[1U]));
|
||||
words.push_back(std::string(1U, letters[2U]));
|
||||
words.push_back(number.substr(0U, 1U));
|
||||
words.push_back(number.substr(1U, 1U));
|
||||
words.push_back(number.substr(2U, 1U));
|
||||
|
||||
// 4001 => 1 => A, 4002 => 2 => B, etc.
|
||||
room %= 100U;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue