diff --git a/OLED.cpp b/OLED.cpp index ac15908..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), @@ -233,6 +271,28 @@ void COLED::clearP25Int() display.display(); } +void COLED::writeCWInt() +{ + display.clearDisplay(); + 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() +{ + display.clearDisplay(); + display.setCursor(0,display.height()/2); + display.setTextSize(3); + display.print("Idle"); + display.setTextSize(1); + display.display(); + display.startscrollright(0x02,0x0f); +} + void COLED::close() { display.close(); 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: