v0.6.355
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "src/displays/displaySSD1306.h"
|
||||
#elif DSP_MODEL==DSP_NOKIA5110
|
||||
#include "src/displays/displayN5110.h"
|
||||
#elif DSP_MODEL==DSP_ST7789
|
||||
#elif DSP_MODEL==DSP_ST7789 || DSP_MODEL==DSP_ST7789_240
|
||||
#include "src/displays/displayST7789.h"
|
||||
#elif DSP_MODEL==DSP_SH1106
|
||||
#include "src/displays/displaySH1106.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef options_h
|
||||
#define options_h
|
||||
|
||||
#define VERSION "0.6.348"
|
||||
#define VERSION "0.6.355"
|
||||
|
||||
/*******************************************************
|
||||
DO NOT EDIT THIS FILE.
|
||||
@@ -37,6 +37,9 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
|
||||
#define DSP_2004 15 // https://aliexpress.com/item/32783128355.html
|
||||
#define DSP_SSD1305I2C 16 // SSD1305 and SSD1309 128x64 I2C https://aliexpress.com/item/32950307344.html
|
||||
#define DSP_ILI9225 17 // 2.0' 220x176 SPI https://aliexpress.com/item/32952021835.html
|
||||
#define DSP_ST7789_240 18 // 1.3' 240x240 SPI https://aliexpress.com/item/32996979276.html
|
||||
/* !!! DSP_ST7789_240 requires further development when used in conjunction with the VS1053 module !!! See the link https://www.instructables.com/Adding-CS-Pin-to-13-LCD/ */
|
||||
|
||||
#define DSP_CUSTOM 101 // your display
|
||||
|
||||
#ifndef DSP_MODEL
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../../options.h"
|
||||
#if DSP_MODEL==4
|
||||
#if DSP_MODEL==DSP_ST7789 || DSP_MODEL==DSP_ST7789_240
|
||||
|
||||
#include "displayST7789.h"
|
||||
#include <SPI.h>
|
||||
@@ -11,7 +11,6 @@
|
||||
#ifndef DEF_SPI_FREQ
|
||||
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
|
||||
#endif
|
||||
|
||||
const char *dow[7] = {"вс","пн","вт","ср","чт","пт","сб"};
|
||||
const char *mnths[12] = {"января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"};
|
||||
|
||||
@@ -116,7 +115,7 @@ void DspCore::apScreen() {
|
||||
}
|
||||
|
||||
void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) {
|
||||
init(240,320);
|
||||
init(240,(DSP_MODEL==DSP_ST7789)?320:240);
|
||||
if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
||||
invertDisplay(TFT_INVERT);
|
||||
cp437(true);
|
||||
@@ -269,6 +268,9 @@ void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){
|
||||
|
||||
sprintf(timeBuf, "%2d %s %d", timeinfo.tm_mday,mnths[timeinfo.tm_mon], timeinfo.tm_year+1900);
|
||||
setTextSize(1);
|
||||
uint16_t wdate, hdate;
|
||||
getTextBounds(timeBuf, 0, 0, &x1, &y1, &wdate, &hdate);
|
||||
fillRect(swidth - wdate - TFT_FRAMEWDT-20, cltop+10, wdate+20, hdate, TFT_BG);
|
||||
rightText(utf8Rus(timeBuf,true), cltop+10, TFT_FG, TFT_BG, false, swidth>240?12:0);
|
||||
drawFastVLine(clleft+wot+clsp/2+3, cltop-hot, hot+3, SILVER);
|
||||
drawFastHLine(clleft+wot+clsp/2+3, cltop-hot+29, 42, SILVER);
|
||||
|
||||
Reference in New Issue
Block a user