Skip to content

Commit 4c9f1bd

Browse files
committed
v0.9.122
1 parent 4739aad commit 4c9f1bd

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ Work is in progress...
226226

227227
---
228228
## Version history
229+
#### v0.9.122
230+
- fixed a bug in the operation of SSD1305 displays
231+
- fixed bug in operation of LCD1602/2004 displays
232+
- fixed errors in Serial Monitor output
233+
229234
#### v0.9.110
230235
- optimization and bug fixes (display, player, netserver, telnet. mqtt)
231236

yoRadio/src/core/controls.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,9 @@ void onBtnClick(int id) {
472472
}
473473
if (display.mode() == STATIONS) {
474474
display.putRequest(NEWMODE, PLAYER);
475+
#ifdef DSP_LCD
476+
delay(200);
477+
#endif
475478
player.sendCommand({PR_PLAY, display.currentPlItem});
476479
}
477480
break;

yoRadio/src/core/options.h

Lines changed: 1 addition & 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 YOVERSION "0.9.118"
4+
#define YOVERSION "0.9.122"
55

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

yoRadio/src/displays/displaySSD1305.cpp

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#define LOGO_WIDTH 21
1414
#define LOGO_HEIGHT 32
1515

16+
#define TAKE_MUTEX() if(player.mutex_pl) xSemaphoreTake(player.mutex_pl, portMAX_DELAY); digitalWrite(TFT_CS, LOW)
17+
#define GIVE_MUTEX() digitalWrite(TFT_CS, HIGH); if(player.mutex_pl) xSemaphoreGive(player.mutex_pl)
18+
1619
#ifndef DEF_SPI_FREQ
1720
#define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */
1821
#endif
@@ -163,7 +166,13 @@ void DspCore::startWrite(void) { }
163166
void DspCore::endWrite(void) { }
164167

165168
void DspCore::loop(bool force) {
169+
#if DSP_MODEL==DSP_SSD1305
170+
TAKE_MUTEX();
171+
#endif
166172
display();
173+
#if DSP_MODEL==DSP_SSD1305
174+
GIVE_MUTEX();
175+
#endif
167176
delay(5);
168177
}
169178

@@ -177,15 +186,43 @@ void DspCore::setTextSize(uint8_t s){
177186
}
178187

179188
void DspCore::flip(){
189+
#if DSP_MODEL==DSP_SSD1305
190+
TAKE_MUTEX();
191+
#endif
180192
setRotation(config.store.flipscreen?2:0);
193+
#if DSP_MODEL==DSP_SSD1305
194+
GIVE_MUTEX();
195+
#endif
181196
}
182197

183198
void DspCore::invert(){
199+
#if DSP_MODEL==DSP_SSD1305
200+
TAKE_MUTEX();
201+
#endif
184202
invertDisplay(config.store.invertdisplay);
203+
#if DSP_MODEL==DSP_SSD1305
204+
GIVE_MUTEX();
205+
#endif
185206
}
186207

187-
void DspCore::sleep(void) { oled_command(SSD1305_DISPLAYOFF); }
188-
void DspCore::wake(void) { oled_command(SSD1305_DISPLAYON); }
208+
void DspCore::sleep(void) {
209+
#if DSP_MODEL==DSP_SSD1305
210+
TAKE_MUTEX();
211+
#endif
212+
oled_command(SSD1305_DISPLAYOFF);
213+
#if DSP_MODEL==DSP_SSD1305
214+
GIVE_MUTEX();
215+
#endif
216+
}
217+
void DspCore::wake(void) {
218+
#if DSP_MODEL==DSP_SSD1305
219+
TAKE_MUTEX();
220+
#endif
221+
oled_command(SSD1305_DISPLAYON);
222+
#if DSP_MODEL==DSP_SSD1305
223+
GIVE_MUTEX();
224+
#endif
225+
}
189226

190227
void DspCore::writePixel(int16_t x, int16_t y, uint16_t color) {
191228
if(_clipping){

0 commit comments

Comments
 (0)