From fe4171f9749daa9b8037284f19469f28729b970f Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 11 Nov 2016 13:22:01 +0000 Subject: [PATCH 1/3] Calculate the options length correctly in all cases. --- DMRNetwork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DMRNetwork.cpp b/DMRNetwork.cpp index 33a526a..12403c0 100644 --- a/DMRNetwork.cpp +++ b/DMRNetwork.cpp @@ -481,7 +481,7 @@ bool CDMRNetwork::writeOptions() ::memcpy(buffer + 4U, m_id, 4U); ::strcpy(buffer + 8U, m_options.c_str()); - return write((unsigned char*)buffer, (unsigned int)::strlen(buffer)); + return write((unsigned char*)buffer, (unsigned int)m_options.length() + 8U); } bool CDMRNetwork::writeConfig() From 56b1610f745a20dfb9535a503505377f40259145 Mon Sep 17 00:00:00 2001 From: Kim - DG9VH Date: Fri, 11 Nov 2016 22:05:26 +0100 Subject: [PATCH 2/3] how to work with the Options-settings --- DMRplus_startup_options.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 DMRplus_startup_options.md diff --git a/DMRplus_startup_options.md b/DMRplus_startup_options.md new file mode 100644 index 0000000..6e7d960 --- /dev/null +++ b/DMRplus_startup_options.md @@ -0,0 +1,32 @@ +# DMRplus - Startup Options + +## Introduction +This file is to give an overview over the Options-parameter in MMDVM.ini [DMR Network]-section. + +## Example +You can pull some conection-info at startup to the DMRplus-Network to define the behavior of TS1 and TS2 in DMR-mode. +An example of such a line would be following: + + Options=StartRef=4013;RelinkTime=15;UserLink=1;TS1_1=262;TS1_2=1;TS1_3=20;TS1_4=110;TS1_5=270; + +If an option is set, it overwrites the setting preset at the master, if an option is empty, it unsets a predefined setting from +the master. If an option is not set, the default from the master would be taken over. + +## What the parameters are about? + +Here is a quick explaination about the options to be set: + + * StartRef: This is the default reflector in TS2, in example: Refl. 4013 + * RelinkTime: This is the time to fall back to the default-reflector if linked to another one and no local traffic is done, + not yet implemented, would come next + * UserLink: This defines, if users are allowed to link to another reflector (other than defined as startreflector) + * 1 = allow + * 0 = disallow + * TS1_1: This is the first of 5 talkgroups that could be set static, in example: TG262 + * TS1_2: This is the second of 5 talkgroups that could be set static, in example: TG1 + * TS1_3: This is the third of 5 talkgroups that could be set static, in example: TG20 + * TS1_4: This is the fourth of 5 talkgroups that could be set static, in example: TG110 + * TS1_5: This is the fifth of 5 talkgroups that could be set static, in example: TG270 + +--- +Info created by DG9VH 2016-11-11 From 90d4ecd8d9306eeb06dfbb9de27feef6333132f3 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Fri, 11 Nov 2016 21:26:07 +0000 Subject: [PATCH 3/3] Add D-Star Logo During a quick demo at the local radio club, one of our members pointed out that D-Star mode didn't have a logo... Not being one to hide from a challenge I hacked one up on the spot.... so here it is. I also reduced the size of the 'idle' text to help stop parts of it being left behind on screen draws. --- OLED.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/OLED.cpp b/OLED.cpp index 73f23a2..d90c0b2 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -56,6 +56,26 @@ static unsigned char logo_dmr_bmp[] = 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111 }; +//D-Star 64x16 px +static unsigned char logo_dstar_bmp[] = + { 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b10000001, 0b11111100, 0b00000000, 0b00111100, 0b00000000, 0b00000000, 0b00000000, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b01000010, 0b01000000, 0b00000000, 0b00000000, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b01000000, 0b01000000, 0b00000000, 0b00000000, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b01000000, 0b01000000, 0b00000000, 0b00000000, 0b01000001, + 0b10000001, 0b00000010, 0b01111111, 0b00111100, 0b01111000, 0b00111100, 0b00111100, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b00000010, 0b01000000, 0b00000010, 0b01000010, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b00000010, 0b01000000, 0b00111110, 0b01000000, 0b01000001, + 0b10000001, 0b00000010, 0b00000000, 0b00000010, 0b01000000, 0b01000010, 0b01000000, 0b00000001, + 0b10000001, 0b00000010, 0b00000000, 0b01000010, 0b01000010, 0b01000010, 0b01000000, 0b01000001, + 0b10000001, 0b11111100, 0b00000000, 0b00111100, 0b00111100, 0b00111100, 0b01000000, 0b01000001, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111 + }; + COLED::COLED(unsigned char displayType, unsigned char displayBrightness, bool displayInvert) : m_displayType(displayType), m_displayBrightness(displayBrightness), @@ -108,7 +128,7 @@ void COLED::setIdleInt() display.clearDisplay(); OLED_statusbar(); display.setCursor(0,display.height()/2); - display.setTextSize(3); + display.setTextSize(2); display.print("Idle"); display.setTextSize(1); display.display(); @@ -286,7 +306,7 @@ void COLED::clearCWInt() { display.clearDisplay(); display.setCursor(0,display.height()/2); - display.setTextSize(3); + display.setTextSize(2); display.print("Idle"); display.setTextSize(1); display.display(); @@ -307,7 +327,7 @@ void COLED::OLED_statusbar() if (m_mode == MODE_DMR) display.drawBitmap(0, 0, logo_dmr_bmp, 48, 16, WHITE); else if (m_mode == MODE_DSTAR) - display.print("D-Star"); + display.drawBitmap(0, 0, logo_dstar_bmp, 64, 16, WHITE); else if (m_mode == MODE_YSF) display.print("Fusion"); else if (m_mode == MODE_P25)