v0.8.00b
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#ifndef displayN5110_h
|
||||
#define displayN5110_h
|
||||
#include "../core/options.h"
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Adafruit_GFX.h>
|
||||
@@ -7,68 +8,25 @@
|
||||
#include "fonts/TinyFont5.h"
|
||||
#include "fonts/TinyFont6.h"
|
||||
#include "fonts/DS_DIGI15pt7b.h"
|
||||
#include "tools/l10n.h"
|
||||
|
||||
#define TFT_LINEHGHT 8
|
||||
#define TFT_FRAMEWDT 0
|
||||
#define CHARWIDTH 6
|
||||
#define CHARHEIGHT 8
|
||||
|
||||
#define DSP_CAN_SLEEP true
|
||||
#define DSP_OLED true
|
||||
#define DSP_OLED
|
||||
|
||||
#if !defined(SCROLLDELTA) || !defined(SCROLLTIME)
|
||||
//#define SCROLLDELTA 8
|
||||
//#define SCROLLTIME 332
|
||||
#define SCROLLDELTA 4
|
||||
#define SCROLLTIME 250
|
||||
typedef GFXcanvas1 Canvas;
|
||||
#include "widgets/widgets.h"
|
||||
#include "widgets/pages.h"
|
||||
|
||||
#if __has_include("conf/displayN5110conf_custom.h")
|
||||
#include "conf/displayN5110conf_custom.h"
|
||||
#else
|
||||
#include "conf/displayN5110conf.h"
|
||||
#endif
|
||||
|
||||
#define META_SIZE 1
|
||||
#define TITLE_TOP1 TFT_FRAMEWDT + TFT_LINEHGHT+1
|
||||
#define TITLE_SIZE2 0
|
||||
#define PLCURRENT_SIZE 1
|
||||
|
||||
|
||||
#define PLMITEMS 7
|
||||
#define PLMITEMLENGHT 40
|
||||
#define PLMITEMHEIGHT 10
|
||||
|
||||
class DspCore: public Adafruit_PCD8544 {
|
||||
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 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);
|
||||
virtual void command(uint8_t c);
|
||||
virtual void data(uint8_t c);
|
||||
void flip();
|
||||
void invert();
|
||||
void sleep();
|
||||
void wake();
|
||||
private:
|
||||
uint16_t swidth, sheight;
|
||||
unsigned long loopdelay;
|
||||
boolean checkdelay(int m, unsigned long &tstamp);
|
||||
#include "tools/commongfx.h"
|
||||
};
|
||||
|
||||
extern DspCore dsp;
|
||||
@@ -76,9 +34,11 @@ extern DspCore dsp;
|
||||
/*
|
||||
* TFT COLORS
|
||||
*/
|
||||
#define SILVER BLACK
|
||||
#define TFT_BG WHITE
|
||||
#define TFT_FG BLACK
|
||||
#define TFT_LOGO BLACK
|
||||
#define BOOT_PRG_COLOR BLACK
|
||||
#define BOOT_TXT_COLOR BLACK
|
||||
#define SILVER BLACK
|
||||
#define TFT_BG WHITE
|
||||
#define TFT_FG BLACK
|
||||
#define TFT_LOGO BLACK
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user