v0.8.089
This commit is contained in:
@@ -61,6 +61,9 @@ void DspCore::initDisplay() {
|
||||
config.theme.buffer = TFT_FG;
|
||||
config.theme.volbarout = TFT_FG;
|
||||
config.theme.volbarin = TFT_FG;
|
||||
config.theme.plcurrent = TFT_BG;
|
||||
config.theme.plcurrentbg = TFT_FG;
|
||||
config.theme.plcurrentfill = TFT_FG;
|
||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||
|
||||
setContrast(config.store.contrast);
|
||||
|
||||
@@ -49,25 +49,7 @@ void DspCore::initDisplay() {
|
||||
Serial.println(F("SH110X allocation failed"));
|
||||
for (;;); // Don't proceed, loop forever
|
||||
}
|
||||
config.theme.background = TFT_BG;
|
||||
config.theme.meta = TFT_BG;
|
||||
config.theme.clock = TFT_FG;
|
||||
config.theme.weather = TFT_FG;
|
||||
config.theme.metabg = TFT_FG;
|
||||
config.theme.metafill = TFT_FG;
|
||||
config.theme.title1 = TFT_FG;
|
||||
config.theme.title2 = TFT_FG;
|
||||
config.theme.rssi = TFT_FG;
|
||||
config.theme.ip = TFT_FG;
|
||||
config.theme.vol = TFT_FG;
|
||||
config.theme.bitrate = TFT_FG;
|
||||
config.theme.digit = TFT_FG;
|
||||
config.theme.buffer = TFT_FG;
|
||||
config.theme.volbarout = TFT_FG;
|
||||
config.theme.volbarin = TFT_FG;
|
||||
|
||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||
|
||||
#include "tools/oledcolorfix.h"
|
||||
cp437(true);
|
||||
flip();
|
||||
invert();
|
||||
|
||||
@@ -53,24 +53,7 @@ void DspCore::initDisplay() {
|
||||
Serial.println(F("SSD1305 allocation failed"));
|
||||
for (;;); // Don't proceed, loop forever
|
||||
}
|
||||
config.theme.background = TFT_BG;
|
||||
config.theme.meta = TFT_BG;
|
||||
config.theme.clock = TFT_FG;
|
||||
config.theme.weather = TFT_FG;
|
||||
config.theme.metabg = TFT_FG;
|
||||
config.theme.metafill = TFT_FG;
|
||||
config.theme.title1 = TFT_FG;
|
||||
config.theme.title2 = TFT_FG;
|
||||
config.theme.rssi = TFT_FG;
|
||||
config.theme.ip = TFT_FG;
|
||||
config.theme.vol = TFT_FG;
|
||||
config.theme.bitrate = TFT_FG;
|
||||
config.theme.digit = TFT_FG;
|
||||
config.theme.buffer = TFT_FG;
|
||||
config.theme.volbarout = TFT_FG;
|
||||
config.theme.volbarin = TFT_FG;
|
||||
|
||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||
#include "tools/oledcolorfix.h"
|
||||
|
||||
cp437(true);
|
||||
flip();
|
||||
|
||||
@@ -45,24 +45,7 @@ void DspCore::initDisplay() {
|
||||
Serial.println(F("SSD1306 allocation failed"));
|
||||
for (;;); // Don't proceed, loop forever
|
||||
}
|
||||
config.theme.background = TFT_BG;
|
||||
config.theme.meta = TFT_BG;
|
||||
config.theme.clock = TFT_FG;
|
||||
config.theme.weather = TFT_FG;
|
||||
config.theme.metabg = TFT_FG;
|
||||
config.theme.metafill = TFT_FG;
|
||||
config.theme.title1 = TFT_FG;
|
||||
config.theme.title2 = TFT_FG;
|
||||
config.theme.rssi = TFT_FG;
|
||||
config.theme.ip = TFT_FG;
|
||||
config.theme.vol = TFT_FG;
|
||||
config.theme.bitrate = TFT_FG;
|
||||
config.theme.digit = TFT_FG;
|
||||
config.theme.buffer = TFT_FG;
|
||||
config.theme.volbarout = TFT_FG;
|
||||
config.theme.volbarin = TFT_FG;
|
||||
|
||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||
#include "tools/oledcolorfix.h"
|
||||
cp437(true);
|
||||
flip();
|
||||
invert();
|
||||
|
||||
32
yoRadio/src/displays/tools/oledcolorfix.h
Normal file
32
yoRadio/src/displays/tools/oledcolorfix.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef _OLEDCOLORFIX_H_
|
||||
#define _OLEDCOLORFIX_H_
|
||||
|
||||
config.theme.background = TFT_BG;
|
||||
#if DSP_INVERT_TITLE
|
||||
config.theme.meta = TFT_BG;
|
||||
config.theme.metabg = TFT_FG;
|
||||
config.theme.metafill = TFT_FG;
|
||||
#else
|
||||
config.theme.meta = TFT_FG;
|
||||
config.theme.metabg = TFT_BG;
|
||||
config.theme.metafill = TFT_BG;
|
||||
#endif
|
||||
config.theme.clock = TFT_FG;
|
||||
config.theme.weather = TFT_FG;
|
||||
config.theme.title1 = TFT_FG;
|
||||
config.theme.title2 = TFT_FG;
|
||||
config.theme.rssi = TFT_FG;
|
||||
config.theme.ip = TFT_FG;
|
||||
config.theme.vol = TFT_FG;
|
||||
config.theme.bitrate = TFT_FG;
|
||||
config.theme.digit = TFT_FG;
|
||||
config.theme.buffer = TFT_FG;
|
||||
config.theme.volbarout = TFT_FG;
|
||||
config.theme.volbarin = TFT_FG;
|
||||
config.theme.plcurrent = TFT_BG;
|
||||
config.theme.plcurrentbg = TFT_FG;
|
||||
config.theme.plcurrentfill = TFT_FG;
|
||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -376,7 +376,11 @@ void NumWidget::setText(const char* txt) {
|
||||
strlcpy(_text, txt, _buffsize);
|
||||
_getBounds();
|
||||
if (strcmp(_oldtext, _text) == 0) return;
|
||||
if (_active) dsp.fillRect(_oldleft == 0 ? _realLeft() : min(_oldleft, _realLeft()), _config.top-_textheight+1, max(_oldtextwidth, _textwidth), _textheight, _bgcolor);
|
||||
uint16_t realth = _textheight;
|
||||
#ifdef DSP_OLED
|
||||
realth = _textheight*CHARHEIGHT;
|
||||
#endif
|
||||
if (_active) dsp.fillRect(_oldleft == 0 ? _realLeft() : min(_oldleft, _realLeft()), _config.top-_textheight+1, max(_oldtextwidth, _textwidth), realth, _bgcolor);
|
||||
_oldtextwidth = _textwidth;
|
||||
_oldleft = _realLeft();
|
||||
if (_active) _draw();
|
||||
|
||||
Reference in New Issue
Block a user