Skip to content

Commit bfb6cd8

Browse files
committed
v0.8.02b
1 parent aac04b6 commit bfb6cd8

File tree

7 files changed

+55
-33
lines changed

7 files changed

+55
-33
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ Work is in progress...
299299

300300
---
301301
## Version history
302+
#### v0.8.02b
303+
- fixed artifacts when displaying the volume level
304+
- changes in mytheme.h . Added colors COLOR_PL_CURRENT, COLOR_PL_CURRENT_BG, COLOR_PL_CURRENT_FILL. Details in [exsamples/mytheme.h](exsamples/mytheme.h)
305+
302306
#### v0.8.01b
303307
- fix INITR_MINI160x80 compiling error
304308
- fix ENC_INTERNALPULLUP descriotion in exsamples/myoptions.h

exsamples/mytheme.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//#define COLOR_BACKGROUND 255, 255, 0 /* background */
2020
//#define COLOR_STATION_NAME 0, 0, 0 /* station name */
2121
//#define COLOR_STATION_BG 91, 118, 255 /* station name background */
22-
//#define COLOR_STATION_FILL 231, 211, 90 /* station name fill background */
22+
//#define COLOR_STATION_FILL 91, 118, 255 /* station name fill background */
2323
//#define COLOR_SNG_TITLE_1 255, 0, 0 /* first title */
2424
//#define COLOR_SNG_TITLE_2 0, 0, 0 /* second title */
2525
//#define COLOR_WEATHER 255, 0, 216 /* weather string */
@@ -39,6 +39,9 @@
3939
//#define COLOR_DIGITS 100, 100, 255 /* volume / station number */
4040
//#define COLOR_DIVIDER 0, 255, 0 /* divider color (DSP_ST7789, DSP_ILI9341, DSP_ILI9225) */
4141
//#define COLOR_BITRATE 231, 211, 90 /* bitrate */
42+
//#define COLOR_PL_CURRENT 0, 0, 0 /* playlist current item */
43+
//#define COLOR_PL_CURRENT_BG 91, 118, 255 /* playlist current item background */
44+
//#define COLOR_PL_CURRENT_FILL 91, 118, 255 /* playlist current item fill background */
4245
//#define COLOR_PLAYLIST_0 255, 0, 0 /* playlist string 0 */
4346
//#define COLOR_PLAYLIST_1 0, 255, 0 /* playlist string 1 */
4447
//#define COLOR_PLAYLIST_2 255, 0, 255 /* playlist string 2 */

yoRadio/src/core/config.cpp

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,37 @@ uint16_t Config::color565(uint8_t r, uint8_t g, uint8_t b)
4949
}
5050

5151
void Config::loadTheme(){
52-
theme.background = color565(COLOR_BACKGROUND);
53-
theme.meta = color565(COLOR_STATION_NAME);
54-
theme.metabg = color565(COLOR_STATION_BG);
55-
theme.metafill = color565(COLOR_STATION_FILL);
56-
theme.title1 = color565(COLOR_SNG_TITLE_1);
57-
theme.title2 = color565(COLOR_SNG_TITLE_2);
58-
theme.digit = color565(COLOR_DIGITS);
59-
theme.div = color565(COLOR_DIVIDER);
60-
theme.weather = color565(COLOR_WEATHER);
61-
theme.vumax = color565(COLOR_VU_MAX);
62-
theme.vumin = color565(COLOR_VU_MIN);
63-
theme.clock = color565(COLOR_CLOCK);
64-
theme.seconds = color565(COLOR_SECONDS);
65-
theme.dow = color565(COLOR_DAY_OF_W);
66-
theme.date = color565(COLOR_DATE);
67-
theme.heap = color565(COLOR_HEAP);
68-
theme.buffer = color565(COLOR_BUFFER);
69-
theme.ip = color565(COLOR_IP);
70-
theme.vol = color565(COLOR_VOLUME_VALUE);
71-
theme.rssi = color565(COLOR_RSSI);
72-
theme.bitrate = color565(COLOR_BITRATE);
73-
theme.volbarout = color565(COLOR_VOLBAR_OUT);
74-
theme.volbarin = color565(COLOR_VOLBAR_IN);
75-
theme.playlist[0] = color565(COLOR_PLAYLIST_0);
76-
theme.playlist[1] = color565(COLOR_PLAYLIST_1);
77-
theme.playlist[2] = color565(COLOR_PLAYLIST_2);
78-
theme.playlist[3] = color565(COLOR_PLAYLIST_3);
79-
theme.playlist[4] = color565(COLOR_PLAYLIST_4);
52+
theme.background = color565(COLOR_BACKGROUND);
53+
theme.meta = color565(COLOR_STATION_NAME);
54+
theme.metabg = color565(COLOR_STATION_BG);
55+
theme.metafill = color565(COLOR_STATION_FILL);
56+
theme.title1 = color565(COLOR_SNG_TITLE_1);
57+
theme.title2 = color565(COLOR_SNG_TITLE_2);
58+
theme.digit = color565(COLOR_DIGITS);
59+
theme.div = color565(COLOR_DIVIDER);
60+
theme.weather = color565(COLOR_WEATHER);
61+
theme.vumax = color565(COLOR_VU_MAX);
62+
theme.vumin = color565(COLOR_VU_MIN);
63+
theme.clock = color565(COLOR_CLOCK);
64+
theme.seconds = color565(COLOR_SECONDS);
65+
theme.dow = color565(COLOR_DAY_OF_W);
66+
theme.date = color565(COLOR_DATE);
67+
theme.heap = color565(COLOR_HEAP);
68+
theme.buffer = color565(COLOR_BUFFER);
69+
theme.ip = color565(COLOR_IP);
70+
theme.vol = color565(COLOR_VOLUME_VALUE);
71+
theme.rssi = color565(COLOR_RSSI);
72+
theme.bitrate = color565(COLOR_BITRATE);
73+
theme.volbarout = color565(COLOR_VOLBAR_OUT);
74+
theme.volbarin = color565(COLOR_VOLBAR_IN);
75+
theme.plcurrent = color565(COLOR_PL_CURRENT);
76+
theme.plcurrentbg = color565(COLOR_PL_CURRENT_BG);
77+
theme.plcurrentfill = color565(COLOR_PL_CURRENT_FILL);
78+
theme.playlist[0] = color565(COLOR_PLAYLIST_0);
79+
theme.playlist[1] = color565(COLOR_PLAYLIST_1);
80+
theme.playlist[2] = color565(COLOR_PLAYLIST_2);
81+
theme.playlist[3] = color565(COLOR_PLAYLIST_3);
82+
theme.playlist[4] = color565(COLOR_PLAYLIST_4);
8083
}
8184

8285
template <class T> int Config::eepromWrite(int ee, const T& value) {

yoRadio/src/core/config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ struct theme_t {
4848
uint16_t bitrate;
4949
uint16_t volbarout;
5050
uint16_t volbarin;
51+
uint16_t plcurrent;
52+
uint16_t plcurrentbg;
53+
uint16_t plcurrentfill;
5154
uint16_t playlist[5];
5255
};
5356
struct config_t

yoRadio/src/core/display.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ void Display::_buildPager(){
7878
#if DSP_MODEL==DSP_NOKIA5110
7979
_plcurrent.init("*", playlistConf, 0, 1);
8080
#else
81-
_plcurrent.init("*", playlistConf, config.theme.meta, config.theme.metabg);
81+
_plcurrent.init("*", playlistConf, config.theme.plcurrent, config.theme.plcurrentbg);
8282
#endif
8383
#ifndef HIDE_TITLE2
8484
_title2 = new ScrollWidget("*", title2Conf, config.theme.title2, config.theme.background);
8585
#endif
8686
#if !defined(DSP_LCD) && DSP_MODEL!=DSP_NOKIA5110
87-
_plbackground = new FillWidget(playlBGConf, config.theme.metafill);
87+
_plbackground = new FillWidget(playlBGConf, config.theme.plcurrentfill);
8888
_metabackground = new FillWidget(metaBGConf, config.theme.metafill);
8989
#endif
9090
#if DSP_MODEL==DSP_NOKIA5110

yoRadio/src/core/options.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef options_h
22
#define options_h
33

4-
#define VERSION "0.8.01b"
4+
#define VERSION "0.8.02b"
55

66
/*******************************************************
77
DO NOT EDIT THIS FILE.
@@ -307,6 +307,15 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
307307
#ifndef COLOR_DIVIDER
308308
#define COLOR_DIVIDER 165, 162, 132
309309
#endif
310+
#ifndef COLOR_PL_CURRENT
311+
#define COLOR_PL_CURRENT 0, 0, 0
312+
#endif
313+
#ifndef COLOR_PL_CURRENT_BG
314+
#define COLOR_PL_CURRENT_BG 231, 211, 90
315+
#endif
316+
#ifndef COLOR_PL_CURRENT_FILL
317+
#define COLOR_PL_CURRENT_FILL 231, 211, 90
318+
#endif
310319
#ifndef COLOR_PLAYLIST_0
311320
#define COLOR_PLAYLIST_0 115, 115, 115
312321
#endif

yoRadio/src/displays/widgets/widgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void SliderWidget::_draw() {
258258
}
259259

260260
void SliderWidget::_clear() {
261-
_oldvalwidth = 0;
261+
// _oldvalwidth = 0;
262262
dsp.fillRect(_config.left, _config.top, _width, _height, _bgcolor);
263263
}
264264
/************************

0 commit comments

Comments
 (0)