This commit is contained in:
e2002
2023-03-22 17:06:08 +03:00
parent 4739aadedc
commit 4c9f1bdbb0
4 changed files with 48 additions and 3 deletions

View File

@@ -226,6 +226,11 @@ Work is in progress...
--- ---
## Version history ## Version history
#### v0.9.122
- fixed a bug in the operation of SSD1305 displays
- fixed bug in operation of LCD1602/2004 displays
- fixed errors in Serial Monitor output
#### v0.9.110 #### v0.9.110
- optimization and bug fixes (display, player, netserver, telnet. mqtt) - optimization and bug fixes (display, player, netserver, telnet. mqtt)

View File

@@ -472,6 +472,9 @@ void onBtnClick(int id) {
} }
if (display.mode() == STATIONS) { if (display.mode() == STATIONS) {
display.putRequest(NEWMODE, PLAYER); display.putRequest(NEWMODE, PLAYER);
#ifdef DSP_LCD
delay(200);
#endif
player.sendCommand({PR_PLAY, display.currentPlItem}); player.sendCommand({PR_PLAY, display.currentPlItem});
} }
break; break;

View File

@@ -1,7 +1,7 @@
#ifndef options_h #ifndef options_h
#define options_h #define options_h
#define YOVERSION "0.9.118" #define YOVERSION "0.9.122"
/******************************************************* /*******************************************************
DO NOT EDIT THIS FILE. DO NOT EDIT THIS FILE.

View File

@@ -13,6 +13,9 @@
#define LOGO_WIDTH 21 #define LOGO_WIDTH 21
#define LOGO_HEIGHT 32 #define LOGO_HEIGHT 32
#define TAKE_MUTEX() if(player.mutex_pl) xSemaphoreTake(player.mutex_pl, portMAX_DELAY); digitalWrite(TFT_CS, LOW)
#define GIVE_MUTEX() digitalWrite(TFT_CS, HIGH); if(player.mutex_pl) xSemaphoreGive(player.mutex_pl)
#ifndef DEF_SPI_FREQ #ifndef DEF_SPI_FREQ
#define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */ #define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */
#endif #endif
@@ -163,7 +166,13 @@ void DspCore::startWrite(void) { }
void DspCore::endWrite(void) { } void DspCore::endWrite(void) { }
void DspCore::loop(bool force) { void DspCore::loop(bool force) {
#if DSP_MODEL==DSP_SSD1305
TAKE_MUTEX();
#endif
display(); display();
#if DSP_MODEL==DSP_SSD1305
GIVE_MUTEX();
#endif
delay(5); delay(5);
} }
@@ -177,15 +186,43 @@ void DspCore::setTextSize(uint8_t s){
} }
void DspCore::flip(){ void DspCore::flip(){
#if DSP_MODEL==DSP_SSD1305
TAKE_MUTEX();
#endif
setRotation(config.store.flipscreen?2:0); setRotation(config.store.flipscreen?2:0);
#if DSP_MODEL==DSP_SSD1305
GIVE_MUTEX();
#endif
} }
void DspCore::invert(){ void DspCore::invert(){
#if DSP_MODEL==DSP_SSD1305
TAKE_MUTEX();
#endif
invertDisplay(config.store.invertdisplay); invertDisplay(config.store.invertdisplay);
#if DSP_MODEL==DSP_SSD1305
GIVE_MUTEX();
#endif
} }
void DspCore::sleep(void) { oled_command(SSD1305_DISPLAYOFF); } void DspCore::sleep(void) {
void DspCore::wake(void) { oled_command(SSD1305_DISPLAYON); } #if DSP_MODEL==DSP_SSD1305
TAKE_MUTEX();
#endif
oled_command(SSD1305_DISPLAYOFF);
#if DSP_MODEL==DSP_SSD1305
GIVE_MUTEX();
#endif
}
void DspCore::wake(void) {
#if DSP_MODEL==DSP_SSD1305
TAKE_MUTEX();
#endif
oled_command(SSD1305_DISPLAYON);
#if DSP_MODEL==DSP_SSD1305
GIVE_MUTEX();
#endif
}
void DspCore::writePixel(int16_t x, int16_t y, uint16_t color) { void DspCore::writePixel(int16_t x, int16_t y, uint16_t color) {
if(_clipping){ if(_clipping){