Merge pull request #182 from phl0/devel

Correct CW transmission display on OLED displays
This commit is contained in:
Jonathan Naylor 2016-10-20 22:03:32 +01:00 committed by GitHub
commit aee7ab6219
2 changed files with 60 additions and 38 deletions

View file

@ -18,6 +18,44 @@
#include "OLED.h" #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) : COLED::COLED(unsigned char displayType, unsigned char displayBrightness, unsigned char displayInvert) :
m_displayType(displayType), m_displayType(displayType),
m_displayBrightness(displayBrightness), m_displayBrightness(displayBrightness),
@ -233,6 +271,28 @@ void COLED::clearP25Int()
display.display(); 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() void COLED::close()
{ {
display.close(); display.close();

38
OLED.h
View file

@ -34,44 +34,6 @@
#include "Adafruit_GFX.h" #include "Adafruit_GFX.h"
#include "ArduiPi_OLED.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 class COLED : public CDisplay
{ {
public: public: