This commit is contained in:
e2002
2022-04-07 09:06:28 +03:00
parent 40f194ab26
commit a9d77271b9
17 changed files with 1044 additions and 19 deletions

View File

@@ -43,4 +43,7 @@
\ \
![ёRadio](images/img20.jpg)\ ![ёRadio](images/img20.jpg)\
\ \
![ёRadio](images/img21.jpg) ![ёRadio](images/img21.jpg)\
\
![ёRadio](images/img22.jpg)

View File

@@ -44,6 +44,7 @@ https://aliexpress.com/item/32965676064.html
- or **ILI9341** 3.2'320x240 SPI https://aliexpress.com/item/33048191074.html - or **ILI9341** 3.2'320x240 SPI https://aliexpress.com/item/33048191074.html
- or **SSD1305 (SSD1309)** 2.4' 128x64 SPI https://aliexpress.com/item/32950307344.html - or **SSD1305 (SSD1309)** 2.4' 128x64 SPI https://aliexpress.com/item/32950307344.html
- or **SH1107** 0.96' 128x64 I2C https://aliexpress.com/item/4000551696674.html - or **SH1107** 0.96' 128x64 I2C https://aliexpress.com/item/4000551696674.html
- or **GC9106** 0.96' 160x80 SPI https://aliexpress.com/item/32947890530.html
##### Controls ##### Controls
- Three tact buttons https://www.aliexpress.com/item/32907144687.html - Three tact buttons https://www.aliexpress.com/item/32907144687.html
@@ -280,6 +281,11 @@ Work is in progress...
--- ---
## Version history ## Version history
#### v0.6.120
- added support for GC9106 160x80 SPI displays
- fixed compiling error with DSP_DUMMY option
- fixed compiling error with DSP_1602I2C / DSP_1602 option
#### v0.6.110 #### v0.6.110
- the logic of division by cores has been changed - the logic of division by cores has been changed
- fixed choppy playback (again) - fixed choppy playback (again)

View File

@@ -89,9 +89,10 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
/* Other settings. */ /* Other settings. */
//#define DTYPE INITR_BLACKTAB /* ST7735 display submodel */ //#define DTYPE INITR_BLACKTAB /* ST7735 display submodel */
/* Could be one of: */ /* Could be one of: */
/* INITR_BLACKTAB 1.8' https://aliexpress.ru/item/1005002822797745.html */ /* INITR_BLACKTAB 1.8' https://aliexpress.com/item/1005002822797745.html */
/* (See this note If INITR_BLACKTAB have a noisy line on one side of the screen https://github.com/e2002/yoradio#note-if-initr_blacktab-dsp-have-a-noisy-line-on-one-side-of-the-screen-then-in-adafruit_st7735cpp ) */ /* (See this note If INITR_BLACKTAB have a noisy line on one side of the screen https://github.com/e2002/yoradio#note-if-initr_blacktab-dsp-have-a-noisy-line-on-one-side-of-the-screen-then-in-adafruit_st7735cpp ) */
/* INITR_144GREENTAB // 1.44' https://aliexpress.ru/item/1005002822797745.html */ /* INITR_144GREENTAB // 1.44' https://aliexpress.com/item/1005002822797745.html */
/* INITR_MINI160x80 // 0.96' 160x80 ST7735S https://???? */
/* INITR_GREENTAB */ /* INITR_GREENTAB */
/* INITR_REDTAB */ /* INITR_REDTAB */
//#define LED_BUILTIN 2 /* LED Pin */ //#define LED_BUILTIN 2 /* LED Pin */

BIN
images/img22.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

View File

@@ -274,7 +274,11 @@ void Display::swichMode(displayMode_e newmode) {
#endif #endif
} }
if (newmode == VOL) { if (newmode == VOL) {
#ifdef IP_INST_VOL
dsp.frameTitle(WiFi.localIP().toString().c_str());
#else
dsp.frameTitle("VOLUME"); dsp.frameTitle("VOLUME");
#endif
} }
if (newmode == LOST) { if (newmode == LOST) {
dsp.frameTitle("* LOST *"); dsp.frameTitle("* LOST *");
@@ -487,7 +491,7 @@ void Display::time(bool redraw) {
TaskHandle_t drawVolumeTaskHandle = NULL; TaskHandle_t drawVolumeTaskHandle = NULL;
bool taskVDone = true; bool taskVDone = true;
void drawVolumeTask( void * pvParameters ) { void drawVolumeTask( void * pvParameters ) {
delay(20); /* but it's too fast 0__o */ delay(50); /* but it's too fast 0__o */
dsp.drawVolumeBar(true); dsp.drawVolumeBar(true);
taskVDone = true; taskVDone = true;
vTaskDelete( NULL ); vTaskDelete( NULL );

View File

@@ -29,6 +29,8 @@
#include "src/displays/displaySH1106.h" #include "src/displays/displaySH1106.h"
#elif DSP_MODEL==DSP_1602 #elif DSP_MODEL==DSP_1602
#include "src/displays/displayLC1602.h" #include "src/displays/displayLC1602.h"
#elif DSP_MODEL==DSP_GC9106
#include "src/displays/displayGC9106.h"
#elif DSP_MODEL==DSP_CUSTOM #elif DSP_MODEL==DSP_CUSTOM
#include "src/displays/displayCustom.h" #include "src/displays/displayCustom.h"
#endif #endif

View File

@@ -1,7 +1,7 @@
#ifndef options_h #ifndef options_h
#define options_h #define options_h
#define VERSION "0.6.110" #define VERSION "0.6.120"
/******************************************************* /*******************************************************
DO NOT EDIT THIS FILE. DO NOT EDIT THIS FILE.
@@ -32,6 +32,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
#define DSP_SSD1305 10 // SSD1305 and SSD1309 128x64 SPI https://aliexpress.com/item/32950307344.html #define DSP_SSD1305 10 // SSD1305 and SSD1309 128x64 SPI https://aliexpress.com/item/32950307344.html
#define DSP_SH1107 11 // https://aliexpress.com/item/4000551696674.html #define DSP_SH1107 11 // https://aliexpress.com/item/4000551696674.html
#define DSP_1602 12 // https://aliexpress.com/item/32685016568.html #define DSP_1602 12 // https://aliexpress.com/item/32685016568.html
#define DSP_GC9106 13 // 0.96' 160x80 (looks like ST7735S, but it's not him) https://aliexpress.com/item/32947890530.html
#define DSP_CUSTOM 101 // your display #define DSP_CUSTOM 101 // your display
#ifndef DSP_MODEL #ifndef DSP_MODEL

View File

@@ -0,0 +1,312 @@
/*!
* These displays use SPI to communicate, 4 or 5 pins are required
* to interface (RST is optional).
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* @section dependencies Dependencies
*
* This library depends on <a href="https://github.com/adafruit/Adafruit_GFX">
* Adafruit_GFX</a> being present on your system. Please make sure you have
* installed the latest version before using this library.
*
* @section author Author
*
* Written by Limor "ladyada" Fried for Adafruit Industries.
*
* @section license License
*
* BSD license, all text here must be included in any redistribution.
*
*/
#include "Adafruit_GC9106Ex.h"
#ifndef ARDUINO_STM32_FEATHER
#include "pins_arduino.h"
#ifndef RASPI
#include "wiring_private.h"
#endif
#endif
#include <limits.h>
#if defined(ARDUINO_ARCH_ARC32) || defined(ARDUINO_MAXIM)
#define SPI_DEFAULT_FREQ 16000000
// Teensy 3.0, 3.1/3.2, 3.5, 3.6
#elif defined(__MK20DX128__) || defined(__MK20DX256__) || \
defined(__MK64FX512__) || defined(__MK66FX1M0__)
#define SPI_DEFAULT_FREQ 40000000
#elif defined(__AVR__) || defined(TEENSYDUINO)
#define SPI_DEFAULT_FREQ 8000000
#elif defined(ESP8266) || defined(ESP32)
#define SPI_DEFAULT_FREQ 40000000
#elif defined(RASPI)
#define SPI_DEFAULT_FREQ 80000000
#elif defined(ARDUINO_ARCH_STM32F1)
#define SPI_DEFAULT_FREQ 36000000
#else
#define SPI_DEFAULT_FREQ 24000000 ///< Default SPI data clock frequency
#endif
#define MADCTL_MY 0x80 ///< Bottom to top
#define MADCTL_MX 0x40 ///< Right to left
#define MADCTL_MV 0x20 ///< Reverse Mode
#define MADCTL_ML 0x10 ///< LCD refresh Bottom to top
#define MADCTL_RGB 0x00 ///< Red-Green-Blue pixel order
#define MADCTL_BGR 0x08 ///< Blue-Green-Red pixel order
#define MADCTL_MH 0x04 ///< LCD refresh right to left
/**************************************************************************/
/*!
@brief Instantiate Adafruit GC9106 driver with software SPI
@param cs Chip select pin #
@param dc Data/Command pin #
@param mosi SPI MOSI pin #
@param sclk SPI Clock pin #
@param rst Reset pin # (optional, pass -1 if unused)
@param miso SPI MISO pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_GC9106Ex::Adafruit_GC9106Ex(int8_t cs, int8_t dc, int8_t mosi,
int8_t sclk, int8_t rst, int8_t miso)
: Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, cs, dc, mosi, sclk,
rst, miso) {}
/**************************************************************************/
/*!
@brief Instantiate Adafruit GC9106 driver with hardware SPI using the
default SPI peripheral.
@param cs Chip select pin # (OK to pass -1 if CS tied to GND).
@param dc Data/Command pin # (required).
@param rst Reset pin # (optional, pass -1 if unused).
*/
/**************************************************************************/
Adafruit_GC9106Ex::Adafruit_GC9106Ex(int8_t cs, int8_t dc, int8_t rst)
: Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, cs, dc, rst) {}
#if !defined(ESP8266)
/**************************************************************************/
/*!
@brief Instantiate Adafruit GC9106 driver with hardware SPI using
a specific SPI peripheral (not necessarily default).
@param spiClass Pointer to SPI peripheral (e.g. &SPI or &SPI1).
@param dc Data/Command pin # (required).
@param cs Chip select pin # (optional, pass -1 if unused and
CS is tied to GND).
@param rst Reset pin # (optional, pass -1 if unused).
*/
/**************************************************************************/
Adafruit_GC9106Ex::Adafruit_GC9106Ex(SPIClass *spiClass, int8_t dc, int8_t cs,
int8_t rst)
: Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, spiClass, cs, dc,
rst) {}
#endif // end !ESP8266
/**************************************************************************/
/*!
@brief Instantiate Adafruit GC9106 driver using parallel interface.
@param busWidth If tft16 (enumeration in Adafruit_SPITFT.h), is a
16-bit interface, else 8-bit.
@param d0 Data pin 0 (MUST be a byte- or word-aligned LSB of a
PORT register -- pins 1-n are extrapolated from this).
@param wr Write strobe pin # (required).
@param dc Data/Command pin # (required).
@param cs Chip select pin # (optional, pass -1 if unused and CS
is tied to GND).
@param rst Reset pin # (optional, pass -1 if unused).
@param rd Read strobe pin # (optional, pass -1 if unused).
*/
/**************************************************************************/
Adafruit_GC9106Ex::Adafruit_GC9106Ex(tftBusWidth busWidth, int8_t d0, int8_t wr,
int8_t dc, int8_t cs, int8_t rst, int8_t rd)
: Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, busWidth, d0, wr, dc,
cs, rst, rd) {}
// clang-format off
static const uint8_t PROGMEM initcmd[] = {
// (COMMAND_BYTE), n, data_bytes....
0x01, 0x80, // Soft reset, then delay 150 ms
(0x28), 0, //Display Off
(0xfe), 0, //GC9106_ENAB1
(0xfe), 0,
(0xfe), 0,
(0xef), 0, //GC9106_ENAB2
(0xb3), 1, 0x03, //GC9106_ACCESS_F0_F1
(0x36), 1, 0xd8, //USER_MADCTL
(0x3a), 1, 0x05, //USER_COLMOD
(0xb6), 1, 0x11, //GC9106_ACCESS_A3_AA_AC
(0xac), 1, 0x0b, //undocumented
(0xb4), 1, 0x21, //GC9106_INVCTR
(0xb0), 1, 0x00, //GC9106_ACCESS_C0_C1_C2_C3_C6
(0xb2), 1, 0x00, //GC9106_ACCESS_E4_EB
(0xb1), 1, 0xc0, //GC9106_ACCESS_E6_E7
(0xe6), 2, 0x50, 0x43, //GC9106_VREG1 [50 43]
(0xe7), 2, 0x56, 0x43, //GC9106_VREG2 [38 43]
(0xF0), 14, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf,
(0xF1), 14, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf,
(0xfe), 0, //GC9106_ENAB1
(0xff), 0, //???
(0x35), 1, 0x00, //USER_TEON
(0x44), 1, 0x00, //GC9106_SETSCANLINE
(0x11), 0x80, //USER_SLPOUT
(0x29), 0, //USER_DISPON
(0x2A), 4, /***Set Column Address***/ 0x00, 0x18, 0x00, 0x67,
(0x2B), 4, /***Set Page Address***/ 0x00, 0x00, 0x00, 0x9f,
//(0x2c), 0, //USER_MEMWR
0x11, 0x80, // Exit Sleep, then delay 150 ms
0x29, 0x80, // Main screen turn on, delay 150 ms
0x00 // End of list
};
// clang-format on
/**************************************************************************/
/*!
@brief Initialize GC9106 chip
Connects to the GC9106 over SPI and sends initialization procedure commands
@param freq Desired SPI clock frequency
*/
/**************************************************************************/
void Adafruit_GC9106Ex::begin(uint32_t freq) {
if (!freq)
freq = SPI_DEFAULT_FREQ;
freq = 8000000;
initSPI(freq);
if (_rst < 0) { // If no hardware reset pin...
sendCommand(GC9106_SWRESET); // Engage software reset
delay(150);
}
uint8_t cmd, x, numArgs;
const uint8_t *addr = initcmd;
while ((cmd = pgm_read_byte(addr++)) > 0) {
x = pgm_read_byte(addr++);
numArgs = x & 0x7F;
sendCommand(cmd, addr, numArgs);
addr += numArgs;
if (x & 0x80)
delay(150);
}
_width = GC9106_TFTWIDTH;
_height = GC9106_TFTHEIGHT;
_colstart =24;
_rowstart = 0;
}
/**************************************************************************/
/*!
@brief Set origin of (0,0) and orientation of TFT display
@param m The index for rotation, from 0-3 inclusive
*/
/**************************************************************************/
void Adafruit_GC9106Ex::setRotation(uint8_t m) {
rotation = m % 4; // can't be higher than 3
switch (rotation) {
case 0:
m = (MADCTL_MX | MADCTL_ML | MADCTL_BGR);
_width = GC9106_TFTWIDTH;
_height = GC9106_TFTHEIGHT;
_xstart = _colstart;
_ystart = _rowstart;
break;
case 1:
m = (MADCTL_MV | MADCTL_ML | MADCTL_BGR);
_width = GC9106_TFTHEIGHT;
_height = GC9106_TFTWIDTH;
_ystart = _colstart;
_xstart = _rowstart;
break;
case 2:
m = (MADCTL_MY | MADCTL_BGR);
_width = GC9106_TFTWIDTH;
_height = GC9106_TFTHEIGHT;
_xstart = _colstart;
_ystart = _rowstart;
break;
case 3:
m = (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_BGR);
_width = GC9106_TFTHEIGHT;
_height = GC9106_TFTWIDTH;
_ystart = _colstart;
_xstart = _rowstart;
break;
}
m ^= 0x80; //.kbv
sendCommand(GC9106_MADCTL, &m, 1);
setScrollMargins(0, 0); //.kbv
scrollTo(0);
}
/**************************************************************************/
/*!
@brief Enable/Disable display color inversion
@param invert True to invert, False to have normal color
*/
/**************************************************************************/
void Adafruit_GC9106Ex::invertDisplay(bool invert) {
sendCommand(invert ? GC9106_INVON : GC9106_INVOFF);
}
/**************************************************************************/
/*!
@brief Scroll display memory
@param y How many pixels to scroll display by
*/
/**************************************************************************/
void Adafruit_GC9106Ex::scrollTo(uint16_t y) {
uint8_t data[2];
data[0] = y >> 8;
data[1] = y & 0xff;
sendCommand(GC9106_VSCRSADD, (uint8_t *)data, 2);
}
/**************************************************************************/
/*!
@brief Set the height of the Top and Bottom Scroll Margins
@param top The height of the Top scroll margin
@param bottom The height of the Bottom scroll margin
*/
/**************************************************************************/
void Adafruit_GC9106Ex::setScrollMargins(uint16_t top, uint16_t bottom) {
// TFA+VSA+BFA must equal 480
if (top + bottom <= GC9106_TFTHEIGHT) {
uint16_t middle = GC9106_TFTHEIGHT - top - bottom;
uint8_t data[6];
data[0] = top >> 8;
data[1] = top & 0xff;
data[2] = middle >> 8;
data[3] = middle & 0xff;
data[4] = bottom >> 8;
data[5] = bottom & 0xff;
sendCommand(GC9106_VSCRDEF, (uint8_t *)data, 6);
}
}
/**************************************************************************/
/*!
@brief Set the "address window" - the rectangle we will write to RAM with
the next chunk of SPI data writes. The GC9106 will automatically wrap
the data as each row is filled
@param x1 TFT memory 'x' origin
@param y1 TFT memory 'y' origin
@param w Width of rectangle
@param h Height of rectangle
*/
/**************************************************************************/
void Adafruit_GC9106Ex::setAddrWindow(uint16_t x1, uint16_t y1, uint16_t w,
uint16_t h) {
x1 += _xstart;
y1 += _ystart;
uint16_t x2 = (x1 + w - 1), y2 = (y1 + h - 1);
writeCommand(GC9106_CASET); // Column address set
SPI_WRITE16(x1);
SPI_WRITE16(x2);
writeCommand(GC9106_PASET); // Row address set
SPI_WRITE16(y1);
SPI_WRITE16(y2);
writeCommand(GC9106_RAMWR); // Write to RAM
}

View File

@@ -0,0 +1,130 @@
/*
* Adafruit_GC9106_kbv class inherits from Adafruit_GFX, Adafruit_SPITFT class and the Arduino Print class.
* Adafruit_GC9106_kbv written by David Prentice
*
* Any use of Adafruit_GC9106_kbv class and examples is dependent on Adafruit and Arduino licenses
* The license texts are in the accompanying license.txt file
*/
/*!
* @file Adafruit_GC9106_kbv.h
*
* These displays use SPI to communicate, 4 or 5 pins are required
* to interface (RST is optional IF YOU ADD A PULLUP RESISTOR).
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
*
* This library depends on <a href="https://github.com/adafruit/Adafruit_GFX">
* Adafruit_GFX</a> being present on your system. Please make sure you have
* installed the latest version before using this library.
*
* Adafruit_GFX, Adafruit_SPITFT written by Limor "ladyada" Fried for Adafruit Industries.
*
* BSD license, all text here must be included in any redistribution.
*
*/
#ifndef _ADAFRUIT_GC9106_EX_H_
#define _ADAFRUIT_GC9106_EX_H_
#include "Adafruit_GFX.h"
#include "Arduino.h"
#include "Print.h"
#include <Adafruit_SPITFT.h>
#include <Adafruit_SPITFT_Macros.h>
#include <SPI.h>
#define GC9106_TFTWIDTH 80 ///< GC9106 max TFT width
#define GC9106_TFTHEIGHT 160 ///< GC9106 max TFT height
#define GC9106_NOP 0x00 ///< No-op register
#define GC9106_SWRESET 0x01 ///< Software reset register
#define GC9106_RDDID 0x04 ///< Read display identification information
#define GC9106_RDDST 0x09 ///< Read Display Status
#define GC9106_SLPIN 0x10 ///< Enter Sleep Mode
#define GC9106_SLPOUT 0x11 ///< Sleep Out
#define GC9106_PTLON 0x12 ///< Partial Mode ON
#define GC9106_NORON 0x13 ///< Normal Display Mode ON
#define GC9106_RDMODE 0x0A ///< Read Display Power Mode
#define GC9106_RDMADCTL 0x0B ///< Read Display MADCTL
#define GC9106_RDPIXFMT 0x0C ///< Read Display Pixel Format
#define GC9106_RDIMGFMT 0x0D ///< Read Display Image Format
#define GC9106_RDSELFDIAG 0x0F ///< Read Display Self-Diagnostic Result
#define GC9106_INVOFF 0x20 ///< Display Inversion OFF
#define GC9106_INVON 0x21 ///< Display Inversion ON
#define GC9106_GAMMASET 0x26 ///< Gamma Set
#define GC9106_DISPOFF 0x28 ///< Display OFF
#define GC9106_DISPON 0x29 ///< Display ON
#define GC9106_CASET 0x2A ///< Column Address Set
#define GC9106_PASET 0x2B ///< Page Address Set
#define GC9106_RAMWR 0x2C ///< Memory Write
#define GC9106_RAMRD 0x2E ///< Memory Read
#define GC9106_PTLAR 0x30 ///< Partial Area
#define GC9106_VSCRDEF 0x33 ///< Vertical Scrolling Definition
#define GC9106_MADCTL 0x36 ///< Memory Access Control
#define GC9106_VSCRSADD 0x37 ///< Vertical Scrolling Start Address
#define GC9106_PIXFMT 0x3A ///< COLMOD: Pixel Format Set
// Color definitions
#define TFT_BLACK 0x0000 ///< 0, 0, 0
#define TFT_NAVY 0x000F ///< 0, 0, 123
#define TFT_DARKGREEN 0x03E0 ///< 0, 125, 0
#define TFT_DARKCYAN 0x03EF ///< 0, 125, 123
#define TFT_MAROON 0x7800 ///< 123, 0, 0
#define TFT_PURPLE 0x780F ///< 123, 0, 123
#define TFT_OLIVE 0x7BE0 ///< 123, 125, 0
#define TFT_LIGHTGREY 0xC618 ///< 198, 195, 198
#define TFT_DARKGREY 0x7BEF ///< 123, 125, 123
#define TFT_BLUE 0x001F ///< 0, 0, 255
#define TFT_GREEN 0x07E0 ///< 0, 255, 0
#define TFT_CYAN 0x07FF ///< 0, 255, 255
#define TFT_RED 0xF800 ///< 255, 0, 0
#define TFT_MAGENTA 0xF81F ///< 255, 0, 255
#define TFT_YELLOW 0xFFE0 ///< 255, 255, 0
#define TFT_WHITE 0xFFFF ///< 255, 255, 255
#define TFT_ORANGE 0xFD20 ///< 255, 165, 0
#define TFT_GREENYELLOW 0xAFE5 ///< 173, 255, 41
#define TFT_PINK 0xFC18 ///< 255, 130, 198
/**************************************************************************/
/*!
@brief Class to manage hardware interface with GC9106 chipset
*/
/**************************************************************************/
class Adafruit_GC9106Ex : public Adafruit_SPITFT {
public:
Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK,
int8_t _RST = -1, int8_t _MISO = -1);
Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _RST = -1);
#if !defined(ESP8266)
Adafruit_GC9106Ex(SPIClass *spiClass, int8_t dc, int8_t cs = -1,
int8_t rst = -1);
#endif // end !ESP8266
Adafruit_GC9106Ex(tftBusWidth busWidth, int8_t d0, int8_t wr, int8_t dc,
int8_t cs = -1, int8_t rst = -1, int8_t rd = -1);
void begin(uint32_t freq = 0);
void setRotation(uint8_t r);
void invertDisplay(bool i);
void scrollTo(uint16_t y);
void setScrollMargins(uint16_t top, uint16_t bottom);
// Transaction API not used by GFX
void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
protected:
uint8_t _colstart = 0, ///< Some displays need this changed to offset
_rowstart = 0; ///< Some displays need this changed to offset
};
#endif // _ADAFRUIT_GC9106H_

View File

@@ -10,6 +10,11 @@
#define PLMITEMLENGHT 40 #define PLMITEMLENGHT 40
#define PLMITEMHEIGHT 22 #define PLMITEMHEIGHT 22
#if !defined(SCROLLDELTA) || !defined(SCROLLTIME)
#define SCROLLDELTA 3
#define SCROLLTIME 60
#endif
class DspCore { class DspCore {
public: public:
DspCore(); DspCore();

View File

@@ -0,0 +1,346 @@
#include "../../options.h"
#if DSP_MODEL==DSP_GC9106
#include "displayGC9106.h"
#include <SPI.h>
#include "fonts/bootlogo40.h"
#include "../../player.h"
#include "../../config.h"
#include "../../network.h"
#ifndef DEF_SPI_FREQ
#define DEF_SPI_FREQ 16000000UL /* set it to 0 for system default */
#endif
DspCore::DspCore(): Adafruit_GC9106Ex(TFT_CS, TFT_DC, TFT_RST) {
}
char* DspCore::utf8Rus(const char* str, bool uppercase) {
int index = 0;
static char strn[BUFLEN];
bool E = false;
strlcpy(strn, str, BUFLEN);
if (uppercase) {
bool next = false;
for (char *iter = strn; *iter != '\0'; ++iter)
{
if (E) {
E = false;
continue;
}
byte rus = (byte) * iter;
if (rus == 208 && (byte) * (iter + 1) == 129) { // ёКостыли
*iter = (char)209;
*(iter + 1) = (char)145;
E = true;
continue;
}
if (rus == 209 && (byte) * (iter + 1) == 145) {
*iter = (char)209;
*(iter + 1) = (char)145;
E = true;
continue;
}
if (next) {
if (rus >= 128 && rus <= 143) *iter = (char)(rus + 32);
if (rus >= 176 && rus <= 191) *iter = (char)(rus - 32);
next = false;
}
if (rus == 208) next = true;
if (rus == 209) {
*iter = (char)208;
next = true;
}
*iter = toupper(*iter);
}
}
while (strn[index])
{
if (strn[index] >= 0xBF)
{
switch (strn[index]) {
case 0xD0: {
if (strn[index + 1] == 0x81) {
strn[index] = 0xA8;
break;
}
if (strn[index + 1] >= 0x90 && strn[index + 1] <= 0xBF) strn[index] = strn[index + 1] + 0x30;
break;
}
case 0xD1: {
if (strn[index + 1] == 0x91) {
//strn[index] = 0xB7;
strn[index] = 0xB8;
break;
}
if (strn[index + 1] >= 0x80 && strn[index + 1] <= 0x8F) strn[index] = strn[index + 1] + 0x70;
break;
}
}
int sind = index + 2;
while (strn[sind]) {
strn[sind - 1] = strn[sind];
sind++;
}
strn[sind - 1] = 0;
}
index++;
}
return strn;
}
void DspCore::apScreen() {
setTextSize(1);
setTextColor(TFT_FG, TFT_BG);
setCursor(TFT_FRAMEWDT, TFT_FRAMEWDT + 2 * TFT_LINEHGHT);
print("AP NAME: ");
print(apSsid);
setCursor(TFT_FRAMEWDT, TFT_FRAMEWDT + 3 * TFT_LINEHGHT);
print("PASSWORD: ");
print(apPassword);
setTextColor(SILVER, TFT_BG);
setCursor(TFT_FRAMEWDT, 107);
print("SETTINGS PAGE ON: ");
setCursor(TFT_FRAMEWDT, 117);
print("http://");
print(WiFi.softAPIP().toString().c_str());
print("/");
}
void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) {
begin(DEF_SPI_FREQ);
cp437(true);
invertDisplay(!TFT_INVERT);
fillScreen(TFT_BG);
setRotation(TFT_ROTATE);
setTextWrap(false);
screenwidth = width();
screenheight = height();
swidth = screenwidth;
sheight = screenheight;
setClockBounds();
}
void DspCore::drawLogo() {
drawRGBBitmap((swidth - 62) / 2, 5, bootlogo40, 62, 40);
}
// http://greekgeeks.net/#maker-tools_convertColor
#define CLR_ITEM1 0x52AA
#define CLR_ITEM2 0x39C7
#define CLR_ITEM3 0x18E3
void DspCore::drawPlaylist(uint16_t currentItem, char* currentItemText) {
for (byte i = 0; i < PLMITEMS; i++) {
plMenu[i][0] = '\0';
}
config.fillPlMenu(plMenu, currentItem - 3, PLMITEMS);
setTextSize(2);
int yStart = (sheight / 2 - PLMITEMHEIGHT / 2) - PLMITEMHEIGHT * (PLMITEMS - 1) / 2 + 3;
//fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO);
for (byte i = 0; i < PLMITEMS; i++) {
if (abs(i - 3) == 3) setTextColor(CLR_ITEM3, TFT_BG);
if (abs(i - 3) == 2) setTextColor(CLR_ITEM2, TFT_BG);
if (abs(i - 3) == 1) setTextColor(CLR_ITEM1, TFT_BG);
if (i == 3) {
strlcpy(currentItemText, plMenu[i], PLMITEMLENGHT - 1);
} else {
setCursor(TFT_FRAMEWDT, yStart + i * PLMITEMHEIGHT);
fillRect(0, yStart + i * PLMITEMHEIGHT - 1, swidth, PLMITEMHEIGHT - 4, TFT_BG);
print(utf8Rus(plMenu[i], true));
}
}
}
void DspCore::clearDsp() {
fillScreen(TFT_BG);
}
void DspCore::drawScrollFrame(uint16_t texttop, uint16_t textheight, uint16_t bg) {
fillRect(0, texttop, TFT_FRAMEWDT, textheight, bg);
fillRect(swidth - TFT_FRAMEWDT, texttop, TFT_FRAMEWDT, textheight, bg);
}
void DspCore::getScrolBbounds(const char* text, const char* separator, byte textsize, uint16_t &tWidth, uint16_t &tHeight, uint16_t &sWidth) {
int16_t x1, y1;
uint16_t w, h;
setTextSize(textsize);
getTextBounds(text, 0, 0, &x1, &y1, &w, &h);
tWidth = w;
tHeight = h;
getTextBounds(separator, 0, 0, &x1, &y1, &w, &h);
sWidth = w;
}
void DspCore::clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg) {
fillRect(0, texttop-2, swidth, textheight+3, bg);
}
void DspCore::centerText(const char* text, byte y, uint16_t fg, uint16_t bg) {
int16_t x1, y1;
uint16_t w, h;
const char* txt = text;
getTextBounds(txt, 0, 0, &x1, &y1, &w, &h);
setTextColor(fg);
setCursor((swidth - w) / 2, y);
fillRect(0, y, swidth, h, bg);
print(txt);
}
void DspCore::rightText(const char* text, byte y, uint16_t fg, uint16_t bg) {
int16_t x1, y1;
uint16_t w, h;
getTextBounds(text, 0, 0, &x1, &y1, &w, &h);
setTextColor(fg);
setCursor(swidth - w - TFT_FRAMEWDT, y);
fillRect(swidth - w - TFT_FRAMEWDT, y, w, h, bg);
print(text);
}
void DspCore::displayHeapForDebug() {
}
void DspCore::setClockBounds(){
setFont(&DS_DIGI28pt7b);
setTextSize(1);
getTextBounds("88:88", 0, 0, &x, &y, &cwidth, &cheight);
uint16_t header = TFT_FRAMEWDT + 4 * TFT_LINEHGHT;
uint16_t footer = TFT_FRAMEWDT * 2 + TFT_LINEHGHT + 5;
clockY = header + (sheight - header - footer) / 2 - cheight / 2 - 6;
setFont();
}
void DspCore::printClock(const char* timestr) {
}
byte DspCore::getPw(uint16_t ncwidth){
byte pw = 6;
if(ncwidth<35) pw = 7;
if(ncwidth<20) pw = 8;
return pw;
}
void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){
char timeBuf[50] = { 0 };
char tmpBuf[4] = { 0 };
uint16_t ncwidth, ncheight;
strftime(timeBuf, sizeof(timeBuf), "%H %M", &timeinfo);
setTextSize(1);
setFont(&DS_DIGI28pt7b);
if(strstr(oldTimeBuf, timeBuf)==NULL || redraw){
getTextBounds(oldTimeBuf, 0, 0, &x, &y, &wot, &hot);
setCursor((swidth - wot) / 2 - 4, clockY+28+6);
setTextColor(TFT_BG);
print(oldTimeBuf);
dot = (swidth - wot) / 2 - 4;
/* dots */
strlcpy(tmpBuf, oldTimeBuf, 3);
getTextBounds(tmpBuf, 0, 0, &x, &y, &ncwidth, &ncheight);
dot = dot + ncwidth + getPw(ncwidth);
setCursor(dot, clockY+28+6);
print(":");
/* dots */
strlcpy(oldTimeBuf, timeBuf, 20);
setTextSize(1);
getTextBounds(timeBuf, 0, 0, &x, &y, &ncwidth, &ncheight);
setTextColor(TFT_LOGO);
setCursor((swidth - ncwidth) / 2 - 4, clockY+28+6);
dot = (swidth - ncwidth) / 2 - 4;
setTextSize(1);
print(timeBuf);
/* dots */
strftime(timeBuf, sizeof(timeBuf), "%H", &timeinfo);
getTextBounds(timeBuf, 0, 0, &x, &y, &ncwidth, &ncheight);
dot = dot + ncwidth + getPw(ncwidth);
/* dots */
}
setCursor(dot, clockY+28+6);
setTextColor(dots?TFT_BG:TFT_LOGO);
print(":");
setFont();
yield();
}
#define VTOP TITLE_TOP1+6
void DspCore::drawVolumeBar(bool withNumber) {
int16_t vTop = sheight - TFT_FRAMEWDT - 2;
int16_t vWidth = swidth - TFT_FRAMEWDT * 2;
uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth);
fillRect(TFT_FRAMEWDT, vTop, vWidth, 2, TFT_BG);
fillRect(TFT_FRAMEWDT, vTop, ww, 2, TFT_LOGO);
if (withNumber) {
setTextSize(1);
setTextColor(TFT_FG);
setFont(&DS_DIGI28pt7b);
char volstr[4];
uint16_t wv, hv;
int16_t x1, y1;
sprintf(volstr, "%d", config.store.volume);
getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv);
fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG);
setCursor((swidth - wv) / 2, VTOP + hv);
print(volstr);
setFont();
}
}
void DspCore::drawNextStationNum(uint16_t num) {
setTextSize(1);
setTextColor(TFT_FG);
setFont(&DS_DIGI28pt7b);
char numstr[7];
uint16_t wv, hv;
int16_t x1, y1;
sprintf(numstr, "%d", num);
getTextBounds(numstr, 0, 0, &x1, &y1, &wv, &hv);
fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG);
setCursor((swidth - wv) / 2, VTOP + hv);
print(numstr);
setFont();
}
void DspCore::frameTitle(const char* str) {
setTextSize(2);
centerText(str, TFT_FRAMEWDT, TFT_LOGO, TFT_BG);
}
void DspCore::rssi(const char* str) {
int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2;
setTextSize(1);
rightText(str, vTop, SILVER, TFT_BG);
}
void DspCore::ip(const char* str) {
int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2;
setTextSize(1);
setTextColor(SILVER, TFT_BG);
setCursor(4, vTop);
print(str);
}
void DspCore::set_TextSize(uint8_t s) {
setTextSize(s);
}
void DspCore::set_TextColor(uint16_t fg, uint16_t bg) {
setTextColor(fg, bg);
}
void DspCore::set_Cursor(int16_t x, int16_t y) {
setCursor(x, y);
}
void DspCore::printText(const char* txt) {
print(txt);
}
void DspCore::loop(bool force) {
}
#endif

View File

@@ -0,0 +1,103 @@
#ifndef displayGC9106_h
#define displayGC9106_h
#include "Arduino.h"
#include <Adafruit_GFX.h>
/* https://github.com/prenticedavid/Adafruit_GC9102_kbv */
#include "../Adafruit_GC9106Ex/Adafruit_GC9106Ex.h"
#include "fonts/DS_DIGI28pt7b.h"
#define TFT_LINEHGHT 10
#define TFT_FRAMEWDT 0
#define PLMITEMS 7
#define PLMITEMLENGHT 40
#define PLMITEMHEIGHT 19
#if !defined(SCROLLDELTA) || !defined(SCROLLTIME)
#define SCROLLDELTA 3
#define SCROLLTIME 65
#endif
#define TFT_FULLTIME 1
#define TITLE_SIZE2 0
#define TITLE_TOP1 TFT_FRAMEWDT + 2 * TFT_LINEHGHT-3
#define BOOTSTR_TOP1 50
#define BOOTSTR_TOP2 65
class DspCore: public Adafruit_GC9106Ex {
public:
DspCore();
char plMenu[PLMITEMS][PLMITEMLENGHT];
uint16_t clockY;
void initD(uint16_t &screenwidth, uint16_t &screenheight);
void apScreen();
void drawLogo();
void clearDsp();
void centerText(const char* text, byte y, uint16_t fg, uint16_t bg);
void rightText(const char* text, byte y, uint16_t fg, uint16_t bg);
void set_TextSize(uint8_t s);
void set_TextColor(uint16_t fg, uint16_t bg);
void set_Cursor(int16_t x, int16_t y);
void printText(const char* txt);
void printClock(const char* timestr);
void printClock(struct tm timeinfo, bool dots, bool redraw = false);
void displayHeapForDebug();
void drawVolumeBar(bool withNumber);
void drawNextStationNum(uint16_t num);
char* utf8Rus(const char* str, bool uppercase);
void drawScrollFrame(uint16_t texttop, uint16_t textheight, uint16_t bg);
void getScrolBbounds(const char* text, const char* separator, byte textsize, uint16_t &tWidth, uint16_t &tHeight, uint16_t &sWidth);
void clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg);
void frameTitle(const char* str);
void rssi(const char* str);
void ip(const char* str);
void drawPlaylist(uint16_t currentItem, char* currentItemText);
void loop(bool force=false);
private:
uint16_t swidth, sheight;
char oldTimeBuf[20];
uint16_t wot, hot, dot;
int16_t x, y;
uint16_t cwidth, cheight;
void setClockBounds();
byte getPw(uint16_t ncwidth);
};
extern DspCore dsp;
/*
* TFT COLORS
*/
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
#define GRAY 0x7BEF
#define DARK_GRAY 0x2945
#define LIGHT_GRAY 0xC618
#define LIME 0x87E0
#define AQUA 0x5D1C
#define CYAN 0x07FF
#define DARK_CYAN 0x03EF
#define ORANGE 0xFCA0
#define PINK 0xF97F
#define BROWN 0x8200
#define VIOLET 0x9199
#define SILVER 0xA510
#define GOLD 0xA508
#define NAVY 0x000F
#define MAROON 0x7800
#define PURPLE 0x780F
#define OLIVE 0x7BE0
#define TFT_BG BLACK
#define TFT_FG WHITE
#define TFT_LOGO 0xE68B // 224, 209, 92
#endif

View File

@@ -13,7 +13,7 @@
const byte controlspaces[] = { CLOCK_SPACE, VOL_SPACE }; const byte controlspaces[] = { CLOCK_SPACE, VOL_SPACE };
#if DSP_MODEL==DSP_1602I2C #ifdef LCD_I2C
DspCore::DspCore(): LiquidCrystal_I2C(SCREEN_ADDRESS, 16, 2, I2C_SDA, I2C_SCL) { DspCore::DspCore(): LiquidCrystal_I2C(SCREEN_ADDRESS, 16, 2, I2C_SDA, I2C_SCL) {
} }
@@ -30,7 +30,7 @@ void DspCore::apScreen() {
} }
void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) {
#if DSP_MODEL==DSP_1602I2C #ifdef LCD_I2C
init(); init();
backlight(); backlight();
#else #else

View File

@@ -3,6 +3,7 @@
#include "Arduino.h" #include "Arduino.h"
#if DSP_MODEL==DSP_1602I2C #if DSP_MODEL==DSP_1602I2C
#define LCD_I2C
#include "../LiquidCrystalI2C/LiquidCrystalI2CEx.h" #include "../LiquidCrystalI2C/LiquidCrystalI2CEx.h"
#else #else
#include <LiquidCrystal.h> #include <LiquidCrystal.h>
@@ -25,7 +26,9 @@
#define BOOTSTR_TOP1 1 #define BOOTSTR_TOP1 1
#define STARTTIME_PL 2000 #define STARTTIME_PL 2000
#if DSP_MODEL==DSP_1602I2C #define IP_INST_VOL
#ifdef LCD_I2C
class DspCore: public LiquidCrystal_I2C { class DspCore: public LiquidCrystal_I2C {
#else #else
class DspCore: public LiquidCrystal { class DspCore: public LiquidCrystal {

View File

@@ -1,9 +1,13 @@
#include "../../options.h" #include "../../options.h"
#if DSP_MODEL==1 #if DSP_MODEL==DSP_ST7735
#include "displayST7735.h" #include "displayST7735.h"
#include <SPI.h> #include <SPI.h>
#ifdef DSP_MINI
#include "fonts/bootlogo40.h"
#else
#include "fonts/bootlogo.h" #include "fonts/bootlogo.h"
#endif
#include "../../player.h" #include "../../player.h"
#include "../../config.h" #include "../../config.h"
#include "../../network.h" #include "../../network.h"
@@ -107,6 +111,7 @@ void DspCore::apScreen() {
void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) {
initR(DTYPE); initR(DTYPE);
cp437(true); cp437(true);
invertDisplay((DTYPE==INITR_MINI160x80)?TFT_INVERT:!TFT_INVERT);
fillScreen(TFT_BG); fillScreen(TFT_BG);
setRotation(TFT_ROTATE); setRotation(TFT_ROTATE);
setTextWrap(false); setTextWrap(false);
@@ -118,7 +123,11 @@ void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) {
} }
void DspCore::drawLogo() { void DspCore::drawLogo() {
#ifdef DSP_MINI
drawRGBBitmap((swidth - 62) / 2, 5, bootlogo40, 62, 40);
#else
drawRGBBitmap((swidth - 99) / 2, 18, bootlogo2, 99, 64); drawRGBBitmap((swidth - 99) / 2, 18, bootlogo2, 99, 64);
#endif
} }
// http://greekgeeks.net/#maker-tools_convertColor // http://greekgeeks.net/#maker-tools_convertColor
@@ -133,7 +142,7 @@ void DspCore::drawPlaylist(uint16_t currentItem, char* currentItemText) {
config.fillPlMenu(plMenu, currentItem - 3, PLMITEMS); config.fillPlMenu(plMenu, currentItem - 3, PLMITEMS);
setTextSize(2); setTextSize(2);
int yStart = (sheight / 2 - PLMITEMHEIGHT / 2) - PLMITEMHEIGHT * (PLMITEMS - 1) / 2 + 3; int yStart = (sheight / 2 - PLMITEMHEIGHT / 2) - PLMITEMHEIGHT * (PLMITEMS - 1) / 2 + 3;
fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO); //fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO);
for (byte i = 0; i < PLMITEMS; i++) { for (byte i = 0; i < PLMITEMS; i++) {
if (abs(i - 3) == 3) setTextColor(CLR_ITEM3, TFT_BG); if (abs(i - 3) == 3) setTextColor(CLR_ITEM3, TFT_BG);
if (abs(i - 3) == 2) setTextColor(CLR_ITEM2, TFT_BG); if (abs(i - 3) == 2) setTextColor(CLR_ITEM2, TFT_BG);
@@ -169,7 +178,7 @@ void DspCore::getScrolBbounds(const char* text, const char* separator, byte text
} }
void DspCore::clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg) { void DspCore::clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg) {
fillRect(0, texttop, swidth, textheight, bg); fillRect(0, texttop-2, swidth, textheight+3, bg);
} }
void DspCore::centerText(const char* text, byte y, uint16_t fg, uint16_t bg) { void DspCore::centerText(const char* text, byte y, uint16_t fg, uint16_t bg) {
@@ -194,6 +203,7 @@ void DspCore::rightText(const char* text, byte y, uint16_t fg, uint16_t bg) {
} }
void DspCore::displayHeapForDebug() { void DspCore::displayHeapForDebug() {
#ifndef DSP_MINI
int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT * 2 - 2; int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT * 2 - 2;
setTextSize(1); setTextSize(1);
setTextColor(DARK_GRAY, TFT_BG); setTextColor(DARK_GRAY, TFT_BG);
@@ -211,6 +221,7 @@ void DspCore::displayHeapForDebug() {
byte sbw = map(aprcnt, 0, 100 , 0, swidth); byte sbw = map(aprcnt, 0, 100 , 0, swidth);
fillRect(0, sheight - 2, sbw, 2, SILVER); fillRect(0, sheight - 2, sbw, 2, SILVER);
#endif #endif
#endif
} }
void DspCore::setClockBounds(){ void DspCore::setClockBounds(){
@@ -220,6 +231,7 @@ void DspCore::setClockBounds(){
uint16_t header = TFT_FRAMEWDT + 4 * TFT_LINEHGHT; uint16_t header = TFT_FRAMEWDT + 4 * TFT_LINEHGHT;
uint16_t footer = TFT_FRAMEWDT * 2 + TFT_LINEHGHT + 5; uint16_t footer = TFT_FRAMEWDT * 2 + TFT_LINEHGHT + 5;
clockY = header + (sheight - header - footer) / 2 - cheight / 2; clockY = header + (sheight - header - footer) / 2 - cheight / 2;
if(DTYPE==INITR_MINI160x80) clockY = clockY-6;
setFont(); setFont();
} }
@@ -275,14 +287,26 @@ void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){
setFont(); setFont();
yield(); yield();
} }
#ifdef DSP_MINI
#define VTOP TITLE_TOP1+6
#else
#define VTOP 48
#endif
void DspCore::drawVolumeBar(bool withNumber) { void DspCore::drawVolumeBar(bool withNumber) {
int16_t vTop = sheight - TFT_FRAMEWDT * 2; #ifdef DSP_MINI
int16_t vWidth = swidth - TFT_FRAMEWDT - 4; int16_t vTop = sheight - TFT_FRAMEWDT - 2;
int16_t vWidth = swidth - TFT_FRAMEWDT * 2;
uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth);
fillRect(TFT_FRAMEWDT, vTop, vWidth, 2, TFT_BG);
fillRect(TFT_FRAMEWDT, vTop, ww, 2, TFT_LOGO);
#else
int16_t vTop = sheight - TFT_FRAMEWDT - 6;
int16_t vWidth = swidth - TFT_FRAMEWDT * 2;
uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth - 2); uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth - 2);
fillRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_BG); fillRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_BG);
drawRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_LOGO); drawRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_LOGO);
fillRect(TFT_FRAMEWDT + 1, vTop - 1, ww, 5, TFT_LOGO); fillRect(TFT_FRAMEWDT + 1, vTop - 1, ww, 5, TFT_LOGO);
#endif
if (withNumber) { if (withNumber) {
setTextSize(1); setTextSize(1);
setTextColor(TFT_FG); setTextColor(TFT_FG);
@@ -292,8 +316,8 @@ void DspCore::drawVolumeBar(bool withNumber) {
int16_t x1, y1; int16_t x1, y1;
sprintf(volstr, "%d", config.store.volume); sprintf(volstr, "%d", config.store.volume);
getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv); getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv);
fillRect(TFT_FRAMEWDT, 48, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG);
setCursor((swidth - wv) / 2, 48 + hv); setCursor((swidth - wv) / 2, VTOP + hv);
print(volstr); print(volstr);
setFont(); setFont();
} }
@@ -308,8 +332,8 @@ void DspCore::drawNextStationNum(uint16_t num) {
int16_t x1, y1; int16_t x1, y1;
sprintf(numstr, "%d", num); sprintf(numstr, "%d", num);
getTextBounds(numstr, 0, 0, &x1, &y1, &wv, &hv); getTextBounds(numstr, 0, 0, &x1, &y1, &wv, &hv);
fillRect(TFT_FRAMEWDT, 48, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG);
setCursor((swidth - wv) / 2, 48 + hv); setCursor((swidth - wv) / 2, VTOP + hv);
print(numstr); print(numstr);
setFont(); setFont();
} }

View File

@@ -7,11 +7,20 @@
#include "fonts/DS_DIGI28pt7b.h" #include "fonts/DS_DIGI28pt7b.h"
#define TFT_LINEHGHT 10 #define TFT_LINEHGHT 10
#if DTYPE==INITR_MINI160x80
#define TFT_FRAMEWDT 0
#define DSP_MINI
#else
#define TFT_FRAMEWDT 4 #define TFT_FRAMEWDT 4
#endif
#define PLMITEMS 7 #define PLMITEMS 7
#define PLMITEMLENGHT 40 #define PLMITEMLENGHT 40
#define PLMITEMHEIGHT 22 #if DTYPE==INITR_MINI160x80
#define PLMITEMHEIGHT 19
#else
#define PLMITEMHEIGHT 21
#endif
#define TITLE_TOP2 TFT_FRAMEWDT + 3 * TFT_LINEHGHT #define TITLE_TOP2 TFT_FRAMEWDT + 3 * TFT_LINEHGHT
#define TITLE_FG2 SILVER #define TITLE_FG2 SILVER
@@ -22,6 +31,13 @@
#define TFT_FULLTIME 1 #define TFT_FULLTIME 1
#if DTYPE==INITR_MINI160x80
#define TITLE_SIZE2 0
#define TITLE_TOP1 TFT_FRAMEWDT + 2 * TFT_LINEHGHT-3
#define BOOTSTR_TOP1 50
#define BOOTSTR_TOP2 65
#endif
class DspCore: public Adafruit_ST7735 { class DspCore: public Adafruit_ST7735 {
public: public:
DspCore(); DspCore();

View File

@@ -0,0 +1,69 @@
#ifndef bootlogo40_h
#define bootlogo40_h
/*******************************************************************************
* generated by lcd-image-converter rev.030b30d from 2019-03-17 01:38:34 +0500
* image
* filename: unsaved
* name: bootlogo
*
* preset name: Color R5G6B5
* data block size: 16 bit(s), uint16_t
* RLE compression enabled: no
* conversion type: Color, not_used not_used
* split to rows: yes
* bits per pixel: 16
*
* preprocess:
* main scan direction: top_to_bottom
* line scan direction: forward
* inverse: no
*******************************************************************************/
#include <stdint.h>
static const uint16_t bootlogo40[2480] PROGMEM = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x5aa4, 0xcdc9, 0xde6a, 0xde4a, 0x9c67, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0x83a5, 0xc527, 0xc526, 0xb4c5, 0x5a83, 0x0820, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7345, 0xd60a, 0xd62a, 0xde2a, 0xde4a, 0xde4a, 0xc5a9, 0x18e1, 0x0000, 0x0000, 0x0000, 0x1081, 0xbd48, 0xcd88, 0xc547, 0xc527, 0xbd06, 0xbce6, 0x7b44, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2102, 0xd5c9, 0xd5c9, 0xd5e9, 0xd60a, 0xd62a, 0xde4a, 0xde4a, 0x83c6, 0x0000, 0x0000, 0x0000, 0x83e6, 0xd5e9, 0xcda8, 0xcd88, 0xcd68, 0xc547, 0xc527, 0xc527, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5243, 0xcd88, 0xcd88, 0xcda9, 0xd5c9, 0xd5e9, 0xd60a, 0xd62a, 0xcdc9, 0x0000, 0x0000, 0x0000, 0xc589, 0xd5e9, 0xd5e9, 0xd5c9, 0xcda8, 0xcd88, 0xc568, 0xcd67, 0x5a83, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5243, 0xc547, 0xc548, 0xcd68, 0xcd88, 0xcda9, 0xd5c9, 0xd5e9, 0xcda9, 0x0000, 0x0000, 0x0000, 0xc5a9, 0xd60a, 0xd609, 0xd5e9, 0xd5e9, 0xd5c9, 0xcda8, 0xcda8, 0x62a4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2102, 0xc547, 0xbd07, 0xc527, 0xc548, 0xcd68, 0xcd88, 0xd5c9, 0x83a5, 0x0000, 0x0000, 0x0000, 0x8c07, 0xde4a, 0xd62a, 0xd62a, 0xd609, 0xd5e9, 0xd5e9, 0xd609, 0x2101, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7304, 0xbd26, 0xbce6, 0xbd07, 0xc527, 0xcd68, 0xc548, 0x18c1, 0x0000, 0x0000, 0x0000, 0x1081, 0xcdca, 0xde4a, 0xde2a, 0xd62a, 0xd60a, 0xde2a, 0x8c06, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x5263, 0xc527, 0xc547, 0xcd87, 0x9c46, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0x9c68, 0xe68b, 0xe68b, 0xe68b, 0x7345, 0x0840, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x1800, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x3000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x6800, 0x3000, 0x8800, 0x0800, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x3000, 0x5000, 0x5800, 0x6000, 0x1000, 0x0000, 0x0000, 0x39a3, 0x83c6, 0xb507, 0xb4e6, 0xb4e6, 0xbd27, 0xc548, 0xacc7, 0x62c4, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0xb800, 0x2000, 0x0000, 0x9000, 0x2000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x4000, 0x6800, 0x6000, 0x3800, 0x2800, 0x9000, 0x9000, 0xb000, 0x6a03, 0xcda8, 0xc546, 0xb4a5, 0xac85, 0xac85, 0xac65, 0xac65, 0xac85, 0xb4a6, 0xc527, 0xd5e8, 0x9447, 0x18c1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4800, 0x6800, 0x0000, 0x0000, 0x2800, 0xe000, 0x3800, 0x0000, 0x0000, 0xa000, 0x0000, 0x1800,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x2800, 0x2800, 0x2800, 0x2800, 0x3000, 0x4800, 0x2000, 0x0000, 0x0000, 0x0000, 0x7000, 0x2000, 0x29a3, 0xc9c2, 0xf141, 0xb445, 0xbcc6, 0xbcc6, 0xb4a6, 0xb4a5, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xaca5, 0xb4a6, 0xbd06, 0xd5e9, 0x62e4, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1800, 0x0000, 0x0000, 0x4000, 0xf000, 0x4000, 0x0000, 0x1800, 0xd000, 0x8000, 0x0000, 0x0000, 0x2000, 0x6000, 0x1000, 0x3800,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x4800, 0x4000, 0x2800, 0x4000, 0x7000, 0x7800, 0x3800, 0x0000, 0x0000, 0x0000, 0x0000, 0x7000, 0x3800, 0x4a85, 0xce0a, 0xd406, 0xf800, 0xbae4, 0xb507, 0xbd06, 0xbce6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xac85, 0xaca6, 0xb4c6, 0xc567, 0x8be6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xa000, 0x5000, 0x0000, 0x0000, 0xb000, 0xa000, 0x0000, 0x0000, 0xa800, 0xd800, 0x1000, 0x0000, 0x0000, 0x5800, 0x4800, 0x3800, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0x5000, 0x1000, 0x0000, 0x2000, 0x4000, 0x0800, 0x2800, 0x8800, 0x0000, 0x0000, 0x0000, 0x4000, 0x8000, 0x49e4, 0xe68b, 0xd62a, 0xd446, 0xf820, 0xc243, 0xb527, 0xc547, 0xc527, 0xbce6, 0xbce6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xac85, 0xb4a5, 0xc547, 0x7345, 0x0000, 0x1000, 0x0000, 0x0000, 0x7800, 0xd000, 0x2000, 0x0000, 0x4800, 0xe800, 0x3000, 0x0000, 0x5800, 0xe800, 0x8000, 0x0000, 0x0000, 0x2800, 0x8000, 0x2800, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0x4800, 0x0000, 0x0000, 0x2000, 0x4000, 0x0000, 0x0000, 0x1800, 0xa000, 0x0000, 0x0000, 0x0800, 0xa800, 0x60c1, 0xde6b, 0xde6b, 0xde8b, 0xdb86, 0xf800, 0xb2e4, 0xbd68, 0xcd88, 0xc567, 0xc547, 0xc527, 0xbce6, 0xbcc6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac65, 0xac45, 0xac65, 0xd465, 0xc000, 0x2000, 0x0000, 0x3800, 0xc000, 0x8000, 0x0000, 0x0800, 0xe000, 0x9000, 0x0000, 0x2000, 0x4000, 0xe000, 0x4000, 0x0000, 0x0800, 0x4800, 0x0800, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x3000, 0x3800, 0x0000, 0x0000, 0x3000, 0x3000, 0x0000, 0x0000, 0x0000, 0x1800, 0xb000, 0x0000, 0x0000, 0x7000, 0xb800, 0x9c68, 0xe6ac, 0xe6ab, 0xde8b, 0xea23, 0xf081, 0x9c47, 0xcdc9, 0xd609, 0xcdc9, 0xb507, 0xa4a7, 0xaca7, 0xbd27, 0xc526, 0xbcc6, 0xb4e6, 0xc3a4, 0xc2e3, 0xbaa3, 0xb323, 0xe860, 0xc961, 0x0000, 0x1800, 0x8800, 0xd800, 0x1000, 0x0000, 0x9800, 0xe800, 0x2000, 0x1000, 0x3800, 0x1000, 0xc800, 0x3000, 0x1800, 0x4800, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x3000, 0x3000, 0x0000, 0x0000, 0x3000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0xa800, 0x0000, 0x2800, 0xe800, 0x7983, 0xd66c, 0xef0c, 0xeeec, 0xe58a, 0xf8c1, 0xb2c4, 0xb569, 0xde6b, 0xa4e8, 0x41e3, 0x18e1, 0x0861, 0x10a1, 0x3162, 0x83a5, 0xcd88, 0xd2c3, 0xca22, 0xa384, 0xa3c4, 0xd181, 0xf040, 0x8b03, 0x49a2, 0x5000, 0xe800, 0x5800, 0x0000, 0x4000, 0xf000, 0x8000, 0x0000, 0x3000, 0x0000, 0x0800, 0x8000, 0x7800, 0x3800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x1000, 0x3000, 0x0000, 0x0000, 0x2800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9000, 0x7000, 0x0000, 0xc000, 0xc820, 0x7bc7, 0xf74d, 0xf74d, 0xef0d, 0xf2e5, 0xd203, 0xace8, 0xde6b, 0xb56a, 0x1081, 0x0000, 0x0000, 0x3800, 0x1000, 0x0000, 0x0840, 0xa182, 0xe162, 0x9384, 0xac86, 0xc364, 0xf800, 0xb982, 0x8bc4, 0x92c3, 0xa000, 0xc000, 0x0000, 0x1800, 0x6000, 0xe000, 0x1000, 0x3000, 0x1000, 0x0000, 0x0000, 0x0800, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x3000, 0x1800, 0x0000, 0x1000, 0x4000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xe000, 0x1800, 0x5000, 0xf800, 0x5860, 0xc60b, 0xf74d, 0xf74d, 0xf4c9, 0xe1e3, 0xb509, 0xde8b, 0xe6cc, 0x5a24, 0x2800, 0x0000, 0x9000, 0xa000, 0x0000, 0x0000, 0x4800, 0xf840, 0xab24, 0xaca6, 0xc4e7, 0xd9c2, 0xf020, 0x82e3, 0xac05, 0xb2e3, 0xd040, 0x3800, 0x0800, 0x4000, 0x2800, 0xb000, 0x4800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0800, 0x4000, 0x0000, 0x0000, 0x5000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8800, 0xa000, 0x0000, 0xb800, 0xc800, 0x28c1, 0xf66c, 0xf60b, 0xeca8, 0xe346, 0xc5eb, 0xdecd, 0xeeed, 0xe488, 0x4800, 0x4000, 0x6000, 0xe800, 0x2000, 0x0000, 0x3000, 0xf000, 0x9000, 0x8be6, 0xcda8, 0xcc46, 0xf020, 0xb9a2, 0x9b84, 0xc364, 0xbbe5, 0xc0a0, 0x2800, 0x4800, 0x1800, 0x0000, 0x2800, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x3800, 0x1000, 0x0000, 0x4000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0xd000, 0x1800, 0x4000, 0xf800, 0x4800, 0x6a85, 0xe569, 0xdd09, 0xd549, 0xd66c, 0xe6ed, 0xeecc, 0xf285, 0xc366, 0x39e3, 0x5982, 0xe000, 0xb121, 0x39e3, 0x49a2, 0xc880, 0xf020, 0x5962, 0xa4e8, 0xd5a9, 0xda84, 0xe860, 0xa2c4, 0xc385, 0xb486, 0xb465, 0x9101, 0x4800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x2800, 0x0000, 0x0800, 0x4800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa800, 0x5000, 0x0000, 0x9800, 0xc800, 0x0000, 0x83c6, 0xe68b, 0xde8c, 0xe6ac, 0xeeed, 0xeecc, 0xf203, 0xdb05, 0xbdaa, 0xe70d, 0xeb46, 0xf860, 0xa468, 0xd60b, 0xdd29, 0xe8e1, 0xd962, 0xa508, 0xd62a, 0xdc06, 0xe1a2, 0xd162, 0xbb85, 0xbcc7, 0xbd27, 0xc547, 0x41a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x3800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6000, 0x9000, 0x0000, 0x2000, 0xf000, 0x6000, 0x0000, 0xa4a8, 0xe66b, 0xe68c, 0xeecc, 0xeecc, 0xf346, 0xe8e1, 0xaca8, 0xe6ac, 0xee4c, 0xf922, 0xca84, 0xbdcb, 0xedeb, 0xddca, 0xf0c1, 0xc305, 0xc5ea, 0xe4a8, 0xd4a8, 0xf000, 0xcaa4, 0xbcc7, 0xc5a9, 0xcda9, 0xcdc8, 0x41c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x4000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x9800, 0x1800, 0x0000, 0x8800, 0xd000, 0x1800, 0x0000, 0xace9, 0xd60a, 0xde4b, 0xe66b, 0xe4a8, 0xf800, 0xbac5, 0xcdeb, 0xeeed, 0xf386, 0xf060, 0xac88, 0xe60b, 0xe56a, 0xe70d, 0xea84, 0xd2c5, 0xdca8, 0xd5aa, 0xe244, 0xe922, 0xac67, 0xcdea, 0xd62a, 0xd609, 0xd609, 0x41e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x4800, 0x0000, 0x0000, 0x0000, 0x0000, 0x5800, 0x8000, 0x1800, 0x0000, 0x1800, 0xf000, 0x6000, 0x0000, 0x0000, 0xacc8, 0xcdc9, 0xd5ea, 0xd64a, 0xe9c3, 0xe881, 0xb447, 0xde8c, 0xe58a, 0xe9c3, 0xca04, 0xc509, 0xed49, 0xde8c, 0xef2d, 0xee6c, 0xd4a8, 0xd5aa, 0xdcc8, 0xf860, 0xb3c6, 0xc5ea, 0xde8b, 0xde6b, 0xde4a, 0xde4a, 0x41e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x4800, 0x1800, 0x0000, 0x1000, 0x7000, 0x5000, 0x0000, 0x0000, 0x0000, 0xa000, 0xc000, 0x0000, 0x0000, 0x0000, 0x8bc6, 0xc568, 0xcda9, 0xcde9, 0xe142, 0xd162, 0xb549, 0xddca, 0xe4a8, 0xdb66, 0xda44, 0xe4a8, 0xde6c, 0xeeed, 0xf72d, 0xf74e, 0xef2d, 0xee0b, 0xeb26, 0xe223, 0xb56a, 0xe6cc, 0xeeec, 0xe6cb, 0xe6ab, 0xde4a, 0x31a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x4800, 0x5800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x3000, 0xe000, 0x2000, 0x0000, 0x0000, 0x0000, 0x7325, 0xc527, 0xc547, 0xc588, 0xd982, 0xca03, 0xbce8, 0xdc27, 0xb549, 0x5204, 0x59a3, 0x5265, 0x5aa5, 0x5ac5, 0x5ac6, 0x5ac6, 0x8285, 0x6a24, 0xc0e1, 0x61a3, 0x5285, 0x5ac5, 0x5ac5, 0x5aa5, 0x5aa5, 0x4a44, 0x0860, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xa800, 0x5800, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a04, 0xbd06, 0xb4e6, 0xbd27, 0xc365, 0xd1c2, 0xc385, 0xbd28, 0xc589, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3800, 0x1800, 0x3000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5000, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0xbd27, 0xac85, 0xb4c6, 0xb4e7, 0xac46, 0xb4c7, 0xc548, 0xcdc9, 0x62c5, 0x0000, 0x0000, 0x0000, 0x0000, 0x4800, 0x2000, 0x0000, 0x7800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x9000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x9405, 0xa444, 0xa465, 0xaca5, 0xb4c6, 0xb4e7, 0xbd27, 0xc548, 0xcda9, 0x41e3, 0x0000, 0x0000, 0x4000, 0x3000, 0x0000, 0x2800, 0x7000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x8000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5263, 0xa444, 0x9c24, 0xa445, 0xac65, 0xaca6, 0xb4c6, 0xbce7, 0xbd27, 0xd5e9, 0x8be6, 0x3081, 0x7820, 0x0040, 0x0020, 0x8820, 0x0820, 0x0840, 0x1060, 0x18a1, 0x5285, 0xbdab, 0x9cc9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x1800, 0xa800, 0x5000, 0x0000, 0x0000, 0x0000, 0x1800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18e1, 0x9be4, 0x93c4, 0x9c04, 0xa424, 0xa445, 0xac65, 0xaca6, 0xb4c6, 0xb4e7, 0xc588, 0xe2a4, 0xac06, 0x9447, 0xaa84, 0xa3c6, 0x9467, 0xad09, 0xde6c, 0xef0d, 0xf70d, 0xeeed, 0xe6ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x7000, 0xf800, 0x6800, 0x0000, 0x0000, 0x3800, 0x3800, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a83, 0x9be3, 0x93a3, 0x9be4, 0x9c04, 0xa424, 0xa445, 0xac85, 0xaca6, 0xb466, 0xe121, 0x9c87, 0xcc06, 0xc446, 0xbd68, 0xd5ea, 0xde2a, 0xde4b, 0xe66b, 0xe6ac, 0xeecc, 0xf72d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x4000, 0xf800, 0xb800, 0x6800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8384, 0x9383, 0x8b83, 0x93a3, 0x9be4, 0x9c04, 0xa424, 0xa465, 0xa425, 0xe0c1, 0xc2a3, 0xb3e5, 0xacc7, 0xc548, 0xcda9, 0xd5c9, 0xd5ea, 0xde2a, 0xde4b, 0xe68b, 0xeeec, 0x3162, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x2000, 0x3000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8364, 0x9382, 0x8b63, 0x9383, 0x93c3, 0x9be4, 0x9c04, 0xa424, 0x9bc4, 0x93a4, 0xa445, 0xb4c6, 0xbd27, 0xc548, 0xc568, 0xcda9, 0xd5c9, 0xd60a, 0xde2a, 0xe66b, 0x62e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a63, 0x8b63, 0x8b62, 0x8b63, 0x8b83, 0x93c3, 0x9be4, 0x9c04, 0x9c24, 0xa465, 0xac85, 0xb4c6, 0xb4e7, 0xbd27, 0xc548, 0xc588, 0xcda9, 0xd5c9, 0xd60a, 0x9427, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x5a62, 0x93c3, 0x9382, 0x8b63, 0x8b83, 0x93c3, 0x9be4, 0x9c04, 0xa424, 0xa465, 0xac85, 0xb4c6, 0xb4e6, 0xbd27, 0xcd88, 0xd5c9, 0xa487, 0x4203, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x3162, 0x6aa3, 0x93a4, 0x9be3, 0xa403, 0xa424, 0xac44, 0xac84, 0xb485, 0xaca6, 0x8bc5, 0x6ae4, 0x41c3, 0x1080, 0x0840, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
#endif