v0.9.689
This commit is contained in:
@@ -235,6 +235,9 @@ Work is in progress...
|
||||
|
||||
---
|
||||
## Version history
|
||||
#### v0.9.689
|
||||
- fixed artifacts in scrolling text
|
||||
|
||||
#### v0.9.686
|
||||
- fixed SD card connection bug in configurations with `SD_SPIPINS` defined
|
||||
- time synchronization setting
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define options_h
|
||||
#pragma once
|
||||
|
||||
#define YOVERSION "0.9.686"
|
||||
#define YOVERSION "0.9.689"
|
||||
|
||||
/*******************************************************
|
||||
DO NOT EDIT THIS FILE.
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
|
||||
/* SROLLS */ /* {{ left, top, fontsize, align }, buffsize, uppercase, width, scrolldelay, scrolldelta, scrolltime } */
|
||||
const ScrollConfig metaConf PROGMEM = {{ TFT_FRAMEWDT+1, TFT_FRAMEWDT+1, 2, WA_LEFT }, 140, true, MAX_WIDTH-2, 5000, 2, 25 };
|
||||
const ScrollConfig title1Conf PROGMEM = {{ 0, 20, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 5000, 2, 25 };
|
||||
const ScrollConfig title2Conf PROGMEM = {{ 0, 29, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 5000, 2, 25 };
|
||||
const ScrollConfig title1Conf PROGMEM = {{ 0, 20, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 5000, 2, 25 };
|
||||
const ScrollConfig title2Conf PROGMEM = {{ 0, 29, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 5000, 2, 25 };
|
||||
const ScrollConfig playlistConf PROGMEM = {{ TFT_FRAMEWDT, 30, 1, WA_LEFT }, 140, true, MAX_WIDTH, 500, 2, 25 };
|
||||
const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT+1, TFT_FRAMEWDT+1, 1, WA_CENTER }, 140, false, MAX_WIDTH-2, 0, 2, 25 };
|
||||
const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT, 64-7, 1, WA_LEFT }, 140, false, MAX_WIDTH, 0, 2, 25 };
|
||||
const ScrollConfig weatherConf PROGMEM = {{ 0, 64-12, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+6, 0, 2, 25 }; // ПОГОДА!!
|
||||
const ScrollConfig weatherConf PROGMEM = {{ 0, 64-12, 1, WA_LEFT }, 140, true, DSP_WIDTH/2+2, 0, 2, 25 }; // ПОГОДА!!
|
||||
|
||||
/* BACKGROUNGC9106DS */ /* {{ left, top, fontsize, align }, width, height, outlined } */
|
||||
const FillConfig metaBGConf PROGMEM = {{ 0, 0, 0, WA_LEFT }, DSP_WIDTH, 18, false };
|
||||
|
||||
@@ -63,7 +63,7 @@ class psFrameBuffer : public Adafruit_GFX {
|
||||
}
|
||||
if(buffer){
|
||||
for (int i = 0; i < _hh * _ww; i++)
|
||||
buffer[i] = 0;
|
||||
buffer[i] = _bgcolor;
|
||||
_ready = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 + 2, "%s", _text); //TODO
|
||||
snprintf(_window, _width / _charWidth + 1, "%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 + 2, "%s", _text); //TODO
|
||||
snprintf(_window, _width / _charWidth + 1, "%s", _text); //TODO
|
||||
dsp.setClipping({_config.left, _config.top, _width, _textheight});
|
||||
dsp.print(_window);
|
||||
dsp.clearClipping();
|
||||
@@ -235,13 +235,14 @@ void ScrollWidget::_draw() {
|
||||
const char* _cursor = _text + _newx / _charWidth;
|
||||
uint16_t hiddenChars = _cursor - _text;
|
||||
if (hiddenChars < strlen(_text)) {
|
||||
snprintf(_window, _width / _charWidth + 2, "%s%s%s", _cursor, _sep, _text);
|
||||
snprintf(_window, _width / _charWidth + 1, "%s%s%s", _cursor, _sep, _text);
|
||||
} else {
|
||||
const char* _scursor = _sep + (_cursor - (_text + strlen(_text)));
|
||||
snprintf(_window, _width / _charWidth + 2, "%s%s", _scursor, _text);
|
||||
snprintf(_window, _width / _charWidth + 1, "%s%s", _scursor, _text);
|
||||
}
|
||||
if(_fb->ready()){
|
||||
#ifdef PSFBUFFER
|
||||
_fb->fillRect(0, 0, _width, _textheight, _bgcolor);
|
||||
_fb->setCursor(_x + hiddenChars * _charWidth, 0);
|
||||
_fb->print(_window);
|
||||
_fb->display();
|
||||
|
||||
Reference in New Issue
Block a user