From 3cc8450f234b5bbf6c12ebfe48cb2465ee062953 Mon Sep 17 00:00:00 2001 From: e2002 Date: Mon, 25 Aug 2025 16:45:25 +0300 Subject: [PATCH] v0.9.676 --- yoRadio/src/core/options.h | 2 +- yoRadio/src/displays/conf/displayILI9341conf.h | 2 +- yoRadio/src/displays/conf/displayILI9488conf.h | 2 +- yoRadio/src/displays/conf/displayST7735_blackconf.h | 2 +- yoRadio/src/displays/conf/displayST7789conf.h | 2 +- yoRadio/src/displays/conf/displayST7796conf.h | 2 +- yoRadio/src/displays/widgets/widgets.cpp | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 395bdfc..9706b05 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -2,7 +2,7 @@ #define options_h #pragma once -#define YOVERSION "0.9.670" +#define YOVERSION "0.9.676" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/displays/conf/displayILI9341conf.h b/yoRadio/src/displays/conf/displayILI9341conf.h index e0da814..19beaf9 100644 --- a/yoRadio/src/displays/conf/displayILI9341conf.h +++ b/yoRadio/src/displays/conf/displayILI9341conf.h @@ -66,6 +66,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs"; /* MOVES */ /* { left, top, width } */ const MoveConfig clockMove PROGMEM = { 0, 176, -1 }; const MoveConfig weatherMove PROGMEM = { 8, 97, MAX_WIDTH }; -const MoveConfig weatherMoveVU PROGMEM = { 70, 97, 250 }; +const MoveConfig weatherMoveVU PROGMEM = { 70, 97, MAX_WIDTH-70+TFT_FRAMEWDT }; #endif diff --git a/yoRadio/src/displays/conf/displayILI9488conf.h b/yoRadio/src/displays/conf/displayILI9488conf.h index 4f9da44..3bd0c00 100644 --- a/yoRadio/src/displays/conf/displayILI9488conf.h +++ b/yoRadio/src/displays/conf/displayILI9488conf.h @@ -67,6 +67,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs"; /* MOVES */ /* { left, top, width } */ const MoveConfig clockMove PROGMEM = { 0, 230, -1 }; const MoveConfig weatherMove PROGMEM = { 8, 120, MAX_WIDTH }; -const MoveConfig weatherMoveVU PROGMEM = { 89, 120, 381 }; +const MoveConfig weatherMoveVU PROGMEM = { 89, 120, MAX_WIDTH-89+TFT_FRAMEWDT }; #endif diff --git a/yoRadio/src/displays/conf/displayST7735_blackconf.h b/yoRadio/src/displays/conf/displayST7735_blackconf.h index 07dbce8..25ae837 100644 --- a/yoRadio/src/displays/conf/displayST7735_blackconf.h +++ b/yoRadio/src/displays/conf/displayST7735_blackconf.h @@ -65,6 +65,6 @@ const char bitrateFmt[] PROGMEM = "%d"; /* MOVES */ /* { left, top, width (0 - auto, -1 - lock } */ const MoveConfig clockMove PROGMEM = { 14, 94, 0}; const MoveConfig weatherMove PROGMEM = {TFT_FRAMEWDT, 48, MAX_WIDTH}; -const MoveConfig weatherMoveVU PROGMEM = { 34, 48, 122 }; +const MoveConfig weatherMoveVU PROGMEM = { 34, 48, MAX_WIDTH-34+TFT_FRAMEWDT }; #endif diff --git a/yoRadio/src/displays/conf/displayST7789conf.h b/yoRadio/src/displays/conf/displayST7789conf.h index 8e44d85..c54f4cc 100644 --- a/yoRadio/src/displays/conf/displayST7789conf.h +++ b/yoRadio/src/displays/conf/displayST7789conf.h @@ -69,6 +69,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs"; /* MOVES */ /* { left, top, width } */ const MoveConfig clockMove PROGMEM = { 8, 180, -1 }; const MoveConfig weatherMove PROGMEM = { 8, 97, MAX_WIDTH }; -const MoveConfig weatherMoveVU PROGMEM = { 70, 97, 250 }; +const MoveConfig weatherMoveVU PROGMEM = { 70, 97, MAX_WIDTH-70+TFT_FRAMEWDT }; #endif diff --git a/yoRadio/src/displays/conf/displayST7796conf.h b/yoRadio/src/displays/conf/displayST7796conf.h index 6de3a7b..b2fc43d 100644 --- a/yoRadio/src/displays/conf/displayST7796conf.h +++ b/yoRadio/src/displays/conf/displayST7796conf.h @@ -67,6 +67,6 @@ const char bitrateFmt[] PROGMEM = "%d kBs"; /* MOVES */ /* { left, top, width } */ const MoveConfig clockMove PROGMEM = { 0, 176, -1 }; const MoveConfig weatherMove PROGMEM = { 8, 120, MAX_WIDTH }; -const MoveConfig weatherMoveVU PROGMEM = { 89, 120, 381 }; +const MoveConfig weatherMoveVU PROGMEM = { 89, 120, MAX_WIDTH-89+TFT_FRAMEWDT }; #endif diff --git a/yoRadio/src/displays/widgets/widgets.cpp b/yoRadio/src/displays/widgets/widgets.cpp index a25393e..75108c6 100644 --- a/yoRadio/src/displays/widgets/widgets.cpp +++ b/yoRadio/src/displays/widgets/widgets.cpp @@ -167,14 +167,14 @@ void ScrollWidget::setText(const char* txt) { #ifdef PSFBUFFER _fb->fillRect(0, 0, _width, _textheight, _bgcolor); _fb->setCursor(0, 0); - snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO + snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO _fb->print(_window); _fb->display(); #endif } else { dsp.fillRect(_config.left, _config.top, _width, _textheight, _bgcolor); dsp.setCursor(_config.left, _config.top); - snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO + snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO dsp.setClipping({_config.left, _config.top, _width, _textheight}); dsp.print(_window); dsp.clearClipping(); @@ -235,10 +235,10 @@ void ScrollWidget::_draw() { const char* _cursor = _text + _newx / _charWidth; uint16_t hiddenChars = _cursor - _text; if (hiddenChars < strlen(_text)) { - snprintf(_window, _width / _charWidth + 1, "%s%s%s", _cursor, _sep, _text); + snprintf(_window, _width / _charWidth + 2, "%s%s%s", _cursor, _sep, _text); } else { const char* _scursor = _sep + (_cursor - (_text + strlen(_text))); - snprintf(_window, _width / _charWidth + 1, "%s%s", _scursor, _text); + snprintf(_window, _width / _charWidth + 2, "%s%s", _scursor, _text); } if(_fb->ready()){ #ifdef PSFBUFFER