This commit is contained in:
e2002
2022-11-22 16:43:11 +03:00
parent 58f1665952
commit 144f80f033
5 changed files with 24 additions and 18 deletions

View File

@@ -301,6 +301,10 @@ Work is in progress...
---
## Version history
#### v0.8.112
- fixed compilation error with BOOMBOX_STYLE parameter
- fixes in default configuration for GC9A01A display
#### v0.8.100
- added support for GC9A01A display https://aliexpress.com/item/1005004069703494.html?sku_id=12000029869654615

View File

@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h
#define VERSION "0.8.100"
#define VERSION "0.8.112"
/*******************************************************
DO NOT EDIT THIS FILE.

View File

@@ -5,8 +5,8 @@
More info on https://github.com/e2002/yoradio/wiki/Widgets#widgets-description
*************************************************************************************/
#ifndef displayST7789conf_h
#define displayST7789conf_h
#ifndef displayGC9A01Aconf_h
#define displayGC9A01Aconf_h
#define DSP_WIDTH 240
#define TFT_FRAMEWDT 8
@@ -17,14 +17,16 @@
#define bootLogoTop 68
#define HIDE_TITLE2
#define BOOMBOX_STYLE
/* SROLLS */ /* {{ left, top, fontsize, align }, buffsize, uppercase, width, scrolldelay, scrolldelta, scrolltime } */
const ScrollConfig metaConf PROGMEM = {{ TFT_FRAMEWDT+12, TFT_FRAMEWDT+28+20, 3, WA_CENTER }, 140, true, MAX_WIDTH-24, 5000, 5, 30 };
const ScrollConfig title1Conf PROGMEM = {{ TFT_FRAMEWDT, /*70*/90, 2, WA_CENTER }, 140, true, MAX_WIDTH, 5000, 4, 30 };
const ScrollConfig title2Conf PROGMEM = {{ TFT_FRAMEWDT, 90, 2, WA_CENTER }, 140, true, MAX_WIDTH, 5000, 4, 30 };
const ScrollConfig playlistConf PROGMEM = {{ TFT_FRAMEWDT, 112, 2, WA_LEFT }, 140, true, MAX_WIDTH, 0, 2, 30 };
const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT+12, TFT_FRAMEWDT+28+20, 3, WA_CENTER }, 140, false, MAX_WIDTH, 0, 4, 20 };
const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT, 240-TFT_FRAMEWDT-16, 2, WA_LEFT }, 140, false, MAX_WIDTH, 0, 4, 30 };
const ScrollConfig weatherConf PROGMEM = {{ TFT_FRAMEWDT+30, 36, 1, WA_LEFT }, 140, true, MAX_WIDTH-60, 0, 3, 30 };
const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT+12, TFT_FRAMEWDT+28+20, 3, WA_CENTER }, 140, false, MAX_WIDTH-24, 0, 4, 20 };
const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT+32, 240-TFT_FRAMEWDT-34, 2, WA_LEFT }, 140, false, MAX_WIDTH-64, 0, 4, 30 };
const ScrollConfig weatherConf PROGMEM = {{ TFT_FRAMEWDT+30, 37, 1, WA_LEFT }, 140, true, MAX_WIDTH-60, 0, 3, 30 };
/* BACKGROUNDS */ /* {{ left, top, fontsize, align }, width, height, outlined } */
const FillConfig metaBGConf PROGMEM = {{ 0, 32+20, 0, WA_LEFT }, DSP_WIDTH, 30, false };
const FillConfig volbarConf PROGMEM = {{ TFT_FRAMEWDT+56, 240-TFT_FRAMEWDT-6, 0, WA_LEFT }, MAX_WIDTH-112, 6+TFT_FRAMEWDT+1, true };
@@ -33,23 +35,23 @@ const FillConfig heapbarConf PROGMEM = {{ 0, 83, 0, WA_LEFT }, DSP_WIDTH, 1
/* WIDGETS */ /* { left, top, fontsize, align } */
const WidgetConfig bootstrConf PROGMEM = { 0, 182, 1, WA_CENTER };
const WidgetConfig bitrateConf PROGMEM = { 134, 20, 1, WA_RIGHT };
const WidgetConfig voltxtConf PROGMEM = { 80, 6, 1, WA_CENTER };
const WidgetConfig bitrateConf PROGMEM = { 134, 23, 1, WA_RIGHT };
const WidgetConfig voltxtConf PROGMEM = { 80, 12, 1, WA_CENTER };
const WidgetConfig iptxtConf PROGMEM = { TFT_FRAMEWDT, 214, 1, WA_CENTER };
const WidgetConfig rssiConf PROGMEM = { 134, 20, 1, WA_LEFT };
const WidgetConfig rssiConf PROGMEM = { 134, 23, 1, WA_LEFT };
const WidgetConfig numConf PROGMEM = { 0, 120+30+20, 52, WA_CENTER };
const WidgetConfig apNameConf PROGMEM = { TFT_FRAMEWDT, 86, 2, WA_CENTER };
const WidgetConfig apName2Conf PROGMEM = { TFT_FRAMEWDT, 110, 2, WA_CENTER };
const WidgetConfig apPassConf PROGMEM = { TFT_FRAMEWDT, 150, 2, WA_CENTER };
const WidgetConfig apPass2Conf PROGMEM = { TFT_FRAMEWDT, 174, 2, WA_CENTER };
const WidgetConfig apNameConf PROGMEM = { TFT_FRAMEWDT, 96, 2, WA_CENTER };
const WidgetConfig apName2Conf PROGMEM = { TFT_FRAMEWDT, 118, 2, WA_CENTER };
const WidgetConfig apPassConf PROGMEM = { TFT_FRAMEWDT, 146, 2, WA_CENTER };
const WidgetConfig apPass2Conf PROGMEM = { TFT_FRAMEWDT, 168, 2, WA_CENTER };
const WidgetConfig clockConf PROGMEM = { 0, 176, 52, WA_CENTER }; /* 52 is a fixed font size. do not change */
const WidgetConfig vuConf PROGMEM = { TFT_FRAMEWDT+10, 188, 1, WA_CENTER };
const WidgetConfig vuConf PROGMEM = { TFT_FRAMEWDT+20, 188, 1, WA_CENTER };
const WidgetConfig bootWdtConf PROGMEM = { 0, 162, 1, WA_CENTER };
const ProgressConfig bootPrgConf PROGMEM = { 90, 14, 4 };
/* BANDS */ /* { onebandwidth, onebandheight, bandsHspace, bandsVspace, numofbands, fadespeed } */
const VUBandsConfig bandsConf PROGMEM = { 90, 20, 10, 2, 10, 5 };
const VUBandsConfig bandsConf PROGMEM = { 90, 20, 6, 2, 10, 5 };
/* STRINGS */
const char numtxtFmt[] PROGMEM = "%d";

View File

@@ -332,7 +332,7 @@ void VuWidget::_draw(){
#else
_canvas->fillRect(0, 0, _bands.width-(_bands.width-measL), _bands.width, _bgcolor);
_canvas->fillRect(_bands.width * 2 + _bands.space - measR, 0, measR, _bands.width, _bgcolor);
dsp->drawRGBBitmap(_config.left, _config.top, _canvas->getBuffer(), _bands.width * 2 + _bands.space, _bands.height);
dsp.drawRGBBitmap(_config.left, _config.top, _canvas->getBuffer(), _bands.width * 2 + _bands.space, _bands.height);
#endif
}else{
_canvas->fillRect(0, 0, _bands.width, measL, _bgcolor);

View File

@@ -100,7 +100,7 @@ void audio_info(const char *info) {
nextion.audioinfo(info);
#endif
if (strstr(info, "failed!") != NULL || strstr(info, " 404") != NULL || strstr(info, " 403") != NULL || strstr(info, "address is empty") != NULL) player.stop(info);
if (strstr(info, "not supported") != NULL || strstr(info, "Account already in use") != NULL) player.stop(info);
if (strstr(info, "not supported") != NULL || strstr(info, "Account already in use") != NULL || strstr(info, "HTTP/1.0 401") != NULL) player.stop(info);
}
void audio_bitrate(const char *info)
@@ -134,7 +134,7 @@ void audio_showstation(const char *info) {
void audio_showstreamtitle(const char *info) {
DBGH();
if (strstr(info, "Account already in use") != NULL){
if (strstr(info, "Account already in use") != NULL || strstr(info, "HTTP/1.0 401") != NULL){
player.stop(info);
return;
}