To implement this feature, using strtok() is not enough.
This cannot handle this case:
Key=#value#comment
it will be #value is the contents of Key. And,
Key=value #comment
(there is a space and a tab between value and #comment)
this will be value<space><tab>. Sometimes these trailing spaces and
tabs makes thing wrong.
Whether in-line comment is used or not, delete trailing space/tab after
value.
two minor improvements
- ScreenLayout in Nextion section can use hexadecimal (0xXXXXX),
octal (0XXXX) and decimal value
- in-line comment enabled
example:
# conventional comment, the line starts with #
[Section]
Key=value # this is new style comment
Key="quoted value # this is not comment"
Key="quoted value" # this is prohibited (not comment)
Previous implementation uses SSRC as IPv4 address that is same behaviour
of Kenwood's NXDN repeater.
RFC 3350 RTP protocol recommends SSRC uses random number.
So I use MT19937 random number generator instead of IP address.
And if this is no problem, I will do two changes.
- replace rand() in DMRNetwork.cpp and DStarNetwork.cpp to MT19937
- remove getLocalAddress() in UDPSocket.cpp
to add new feature easily, the definition of ScreenLayout in [Nextion]
has changed like this.
ScreenLayout < 8: compatibile setting for old config file
0: G4KLX @ 9600bps
1: (reserved)
2: ON7LDS @ 9600bps
3: ON7LDS-DIY @ 9600bps
4: ON7LDS-DIY @ 115200bps
ScreenLayout >= 8: new world, set the bit to enable each feature
bit3 (8) use 115200bps
bit4 (16) Display DMR Talker Alias
bit5 (32) Colour change when displaying TA
bit6 (64) Font size change when displaying long TA text
bit7 (128) Display DIY status when MMDVM IDLE
old settings are same as:
0 -> 0
2 -> 112 (16+32+64)
3 -> 144 (16+128)
4 -> 152 (8+16+128)