From 1fa0f5deb602be4736134132ae74b120e7d91db0 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 20 Oct 2016 10:59:12 +0200 Subject: [PATCH 1/5] Add procedures for CW Ident display to OLED driver --- OLED.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OLED.cpp b/OLED.cpp index ac15908..bcfc00f 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -233,6 +233,14 @@ void COLED::clearP25Int() display.display(); } +void COLED::writeCWInt() +{ +} + +void COLED::clearCWInt() +{ +} + void COLED::close() { display.close(); From baa2dfa3809b6e8b4265d682cdbd647ad99ff762 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 20 Oct 2016 11:11:26 +0200 Subject: [PATCH 2/5] Add display of CW transmission --- OLED.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OLED.cpp b/OLED.cpp index bcfc00f..1ec2c44 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -235,6 +235,12 @@ void COLED::clearP25Int() void COLED::writeCWInt() { + display.setCursor(0,display.height()/2); + display.setTextSize(3); + display.print("CW TX"); + display.setTextSize(1); + display.display(); + display.startscrollright(0x02,0x0f); } void COLED::clearCWInt() From 362c9628eaddb4eca49e07b181d196bebae20536 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 20 Oct 2016 11:26:36 +0200 Subject: [PATCH 3/5] Return to Idle display from CW transmission --- OLED.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OLED.cpp b/OLED.cpp index 1ec2c44..4e67d93 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -245,6 +245,12 @@ void COLED::writeCWInt() void COLED::clearCWInt() { + display.setCursor(0,display.height()/2); + display.setTextSize(3); + display.print("Idle"); + display.setTextSize(1); + display.display(); + display.startscrollright(0x02,0x0f); } void COLED::close() From 87de3105c2437053d46e0f27469e2a79587cbcd4 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 20 Oct 2016 13:03:51 +0200 Subject: [PATCH 4/5] Clear display before displaying CW transmission --- OLED.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OLED.cpp b/OLED.cpp index 4e67d93..7421ced 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -235,6 +235,7 @@ void COLED::clearP25Int() void COLED::writeCWInt() { + display.clearDisplay(); display.setCursor(0,display.height()/2); display.setTextSize(3); display.print("CW TX"); @@ -245,6 +246,7 @@ void COLED::writeCWInt() void COLED::clearCWInt() { + display.clearDisplay(); display.setCursor(0,display.height()/2); display.setTextSize(3); display.print("Idle"); From 334d9fade7eee51f131b2b83e16de14d7cb1bac6 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 20 Oct 2016 22:49:51 +0200 Subject: [PATCH 5/5] Move variable definitions to source file to avoid compiler warnings. --- OLED.cpp | 38 ++++++++++++++++++++++++++++++++++++++ OLED.h | 38 -------------------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/OLED.cpp b/OLED.cpp index 7421ced..6d86cc5 100644 --- a/OLED.cpp +++ b/OLED.cpp @@ -18,6 +18,44 @@ #include "OLED.h" +static unsigned char logo_glcd_bmp[] = + { 0b00101011, 0b11010100, + 0b01010111, 0b11101010, + 0b01010111, 0b11101010, + 0b00101011, 0b11010100, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000001, 0b10000000, + 0b00000000, 0b00000000 }; + +//DMR 48x16 px +static unsigned char logo_dmr_bmp[] = + { 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b10111111, 0b11111000, 0b01111000, 0b00011110, 0b01111111, 0b11100001, + 0b10111111, 0b11111110, 0b01111100, 0b00111110, 0b01100000, 0b00011001, + 0b10110000, 0b00001110, 0b01100110, 0b01100110, 0b01100000, 0b00011001, + 0b10110000, 0b00000110, 0b01100011, 0b11000110, 0b01100000, 0b00011001, + 0b10110000, 0b00000110, 0b01100001, 0b10000110, 0b01100000, 0b00011001, + 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01111111, 0b11111001, + 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01111000, 0b00000001, + 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01101100, 0b00000001, + 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01100110, 0b00000001, + 0b10110000, 0b00001110, 0b01100000, 0b00000110, 0b01100011, 0b00000001, + 0b10111111, 0b11111110, 0b01100000, 0b00000110, 0b01100001, 0b10000001, + 0b10011111, 0b11111000, 0b01100000, 0b00000110, 0b01100000, 0b11000001, + 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, + 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111 + }; + COLED::COLED(unsigned char displayType, unsigned char displayBrightness, unsigned char displayInvert) : m_displayType(displayType), m_displayBrightness(displayBrightness), diff --git a/OLED.h b/OLED.h index 9d8ca33..62e4b70 100644 --- a/OLED.h +++ b/OLED.h @@ -34,44 +34,6 @@ #include "Adafruit_GFX.h" #include "ArduiPi_OLED.h" -static unsigned char logo_glcd_bmp[] = - { 0b00101011, 0b11010100, - 0b01010111, 0b11101010, - 0b01010111, 0b11101010, - 0b00101011, 0b11010100, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000001, 0b10000000, - 0b00000000, 0b00000000 }; - -//DMR 48x16 px -static unsigned char logo_dmr_bmp[] = - { 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, - 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, - 0b10111111, 0b11111000, 0b01111000, 0b00011110, 0b01111111, 0b11100001, - 0b10111111, 0b11111110, 0b01111100, 0b00111110, 0b01100000, 0b00011001, - 0b10110000, 0b00001110, 0b01100110, 0b01100110, 0b01100000, 0b00011001, - 0b10110000, 0b00000110, 0b01100011, 0b11000110, 0b01100000, 0b00011001, - 0b10110000, 0b00000110, 0b01100001, 0b10000110, 0b01100000, 0b00011001, - 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01111111, 0b11111001, - 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01111000, 0b00000001, - 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01101100, 0b00000001, - 0b10110000, 0b00000110, 0b01100000, 0b00000110, 0b01100110, 0b00000001, - 0b10110000, 0b00001110, 0b01100000, 0b00000110, 0b01100011, 0b00000001, - 0b10111111, 0b11111110, 0b01100000, 0b00000110, 0b01100001, 0b10000001, - 0b10011111, 0b11111000, 0b01100000, 0b00000110, 0b01100000, 0b11000001, - 0b10000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001, - 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111 - }; - class COLED : public CDisplay { public: