v0.8.00b
This commit is contained in:
@@ -1,29 +1,25 @@
|
||||
#ifndef displaySH1106_h
|
||||
#define displaySH1106_h
|
||||
#include "../core/options.h"
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SH110X.h>
|
||||
#include "tools/l10n.h"
|
||||
|
||||
#define TFT_LINEHGHT 8
|
||||
#define TFT_FRAMEWDT 0
|
||||
#define DSP_CAN_SLEEP true
|
||||
#define DSP_OLED true
|
||||
#define CHARWIDTH 6
|
||||
#define CHARHEIGHT 8
|
||||
|
||||
#define PLMITEMS 7
|
||||
#define PLMITEMLENGHT 40
|
||||
#define PLMITEMHEIGHT 10
|
||||
#define TITLE_TOP2 TFT_FRAMEWDT + 3 * TFT_LINEHGHT
|
||||
#define PLCURRENT_SIZE 1
|
||||
#define TFT_FULLTIME 1
|
||||
#define DSP_OLED
|
||||
|
||||
#if DSP_MODEL==DSP_SH1107
|
||||
#define TITLE_SIZE2 0
|
||||
#endif
|
||||
typedef GFXcanvas1 Canvas;
|
||||
#include "widgets/widgets.h"
|
||||
#include "widgets/pages.h"
|
||||
|
||||
#if !defined(SCROLLDELTA) || !defined(SCROLLTIME)
|
||||
#define SCROLLDELTA 2
|
||||
#define SCROLLTIME 35
|
||||
#if __has_include("conf/displaySH1106conf_custom.h")
|
||||
#include "conf/displaySH1106conf_custom.h"
|
||||
#else
|
||||
#include "conf/displaySH1106conf.h"
|
||||
#endif
|
||||
|
||||
#if DSP_MODEL==DSP_SH1106
|
||||
@@ -31,52 +27,20 @@ class DspCore: public Adafruit_SH1106G {
|
||||
#else
|
||||
class DspCore: public Adafruit_SH1107 {
|
||||
#endif
|
||||
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);
|
||||
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;
|
||||
|
||||
/*
|
||||
* TFT COLORS
|
||||
* OLED COLORS
|
||||
*/
|
||||
#define SILVER SH110X_WHITE
|
||||
#define TFT_BG SH110X_BLACK
|
||||
#define TFT_FG SH110X_WHITE
|
||||
#define TFT_LOGO SH110X_WHITE
|
||||
#define BOOT_PRG_COLOR SH110X_WHITE
|
||||
#define BOOT_TXT_COLOR SH110X_WHITE
|
||||
#define PINK SH110X_WHITE
|
||||
#define SILVER SH110X_WHITE
|
||||
#define TFT_BG SH110X_BLACK
|
||||
#define TFT_FG SH110X_WHITE
|
||||
#define TFT_LOGO SH110X_WHITE
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user