Skip to content

Commit 5f408e8

Browse files
committed
v0.9.689
1 parent 7c49d19 commit 5f408e8

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ Work is in progress...
235235

236236
---
237237
## Version history
238+
#### v0.9.689
239+
- fixed artifacts in scrolling text
240+
238241
#### v0.9.686
239242
- fixed SD card connection bug in configurations with `SD_SPIPINS` defined
240243
- time synchronization setting

yoRadio/src/core/options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define options_h
33
#pragma once
44

5-
#define YOVERSION "0.9.686"
5+
#define YOVERSION "0.9.689"
66

77
/*******************************************************
88
DO NOT EDIT THIS FILE.

yoRadio/src/displays/conf/displaySSD1322conf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
/* SROLLS */ /* {{ left, top, fontsize, align }, buffsize, uppercase, width, scrolldelay, scrolldelta, scrolltime } */
2323
const ScrollConfig metaConf PROGMEM = {{ TFT_FRAMEWDT+1, TFT_FRAMEWDT+1, 2, WA_LEFT }, 140, true, MAX_WIDTH-2, 5000, 2, 25 };
24-
const ScrollConfig title1Conf PROGMEM = {{ 0, 20, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 5000, 2, 25 };
25-
const ScrollConfig title2Conf PROGMEM = {{ 0, 29, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 5000, 2, 25 };
24+
const ScrollConfig title1Conf PROGMEM = {{ 0, 20, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 5000, 2, 25 };
25+
const ScrollConfig title2Conf PROGMEM = {{ 0, 29, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 5000, 2, 25 };
2626
const ScrollConfig playlistConf PROGMEM = {{ TFT_FRAMEWDT, 30, 1, WA_LEFT }, 140, true, MAX_WIDTH, 500, 2, 25 };
2727
const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT+1, TFT_FRAMEWDT+1, 1, WA_CENTER }, 140, false, MAX_WIDTH-2, 0, 2, 25 };
2828
const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT, 64-7, 1, WA_LEFT }, 140, false, MAX_WIDTH, 0, 2, 25 };
29-
const ScrollConfig weatherConf PROGMEM = {{ 0, 64-12, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 0, 2, 25 }; // ПОГОДА!!
29+
const ScrollConfig weatherConf PROGMEM = {{ 0, 64-12, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 0, 2, 25 }; // ПОГОДА!!
3030

3131
/* BACKGROUNGC9106DS */ /* {{ left, top, fontsize, align }, width, height, outlined } */
3232
const FillConfig metaBGConf PROGMEM = {{ 0, 0, 0, WA_LEFT }, DSP_WIDTH, 18, false };

yoRadio/src/displays/tools/psframebuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class psFrameBuffer : public Adafruit_GFX {
6363
}
6464
if(buffer){
6565
for (int i = 0; i < _hh * _ww; i++)
66-
buffer[i] = 0;
66+
buffer[i] = _bgcolor;
6767
_ready = true;
6868
}
6969
}

yoRadio/src/displays/widgets/widgets.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,14 @@ void ScrollWidget::setText(const char* txt) {
167167
#ifdef PSFBUFFER
168168
_fb->fillRect(0, 0, _width, _textheight, _bgcolor);
169169
_fb->setCursor(0, 0);
170-
snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO
170+
snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO
171171
_fb->print(_window);
172172
_fb->display();
173173
#endif
174174
} else {
175175
dsp.fillRect(_config.left, _config.top, _width, _textheight, _bgcolor);
176176
dsp.setCursor(_config.left, _config.top);
177-
snprintf(_window, _width / _charWidth + 2, "%s", _text); //TODO
177+
snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO
178178
dsp.setClipping({_config.left, _config.top, _width, _textheight});
179179
dsp.print(_window);
180180
dsp.clearClipping();
@@ -235,13 +235,14 @@ void ScrollWidget::_draw() {
235235
const char* _cursor = _text + _newx / _charWidth;
236236
uint16_t hiddenChars = _cursor - _text;
237237
if (hiddenChars < strlen(_text)) {
238-
snprintf(_window, _width / _charWidth + 2, "%s%s%s", _cursor, _sep, _text);
238+
snprintf(_window, _width / _charWidth + 1, "%s%s%s", _cursor, _sep, _text);
239239
} else {
240240
const char* _scursor = _sep + (_cursor - (_text + strlen(_text)));
241-
snprintf(_window, _width / _charWidth + 2, "%s%s", _scursor, _text);
241+
snprintf(_window, _width / _charWidth + 1, "%s%s", _scursor, _text);
242242
}
243243
if(_fb->ready()){
244244
#ifdef PSFBUFFER
245+
_fb->fillRect(0, 0, _width, _textheight, _bgcolor);
245246
_fb->setCursor(_x + hiddenChars * _charWidth, 0);
246247
_fb->print(_window);
247248
_fb->display();

0 commit comments

Comments
 (0)