Skip to content

Commit

Permalink
v0.9.259
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002 committed Jun 7, 2023
1 parent caa5cb7 commit b2a4eb8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ Work is in progress...

---
## Version history
#### v0.9.259
- fixed a hang bug when switching to SD mode after removing the SD
- fixed a hangup error when the connection to the stream was lost in WEB mode

#### v0.9.250
- added support for DS1307 or DS3231 RTC module (you need to install the RTCLib library in the library manager)
- setup
Expand Down
11 changes: 10 additions & 1 deletion examples/myoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
/* SD VSPI PINS. SD SCK must be connected to pin 18
SD MISO must be connected to pin 19
SD MOSI must be connected to pin 23 */
//#define SDC_CS 255 /* SDCARD CS pin */
/* SD HSPI PINS. SD SCK must be connected to pin 14
SD MISO must be connected to pin 12
SD MOSI must be connected to pin 13 */
//#define SDC_CS 255 /* SDCARD CS pin */
//#define SD_HSPI false /* use HSPI for SD (miso=12, mosi=13, clk=14) instead of VSPI (by default) */

/* RTC */
//#define RTC_MODULE RTC_MODULE_UNDEFINED /* one of DS3231, DS1307, RTC_MODULE_UNDEFINED(default) */
//#define RTC_SDA 255 /* RTC_SDA */
//#define RTC_SCL 255 /* RTC_SCL */

/* ENCODER2 */
//#define ENC2_BTNL 255 /* Left rotation */
Expand Down
8 changes: 6 additions & 2 deletions yoRadio/src/core/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ DspCore dsp;

Page *pages[] = { new Page(), new Page(), new Page() };

#ifndef DSQ_SEND_DELAY
#define DSQ_SEND_DELAY portMAX_DELAY
#endif

#ifndef CORE_STACK_SIZE
#define CORE_STACK_SIZE 1024*3
#endif
Expand Down Expand Up @@ -298,7 +302,7 @@ void Display::_swichMode(displayMode_e newmode) {
}

void Display::resetQueue(){
xQueueReset(displayQueue);
if(displayQueue!=NULL) xQueueReset(displayQueue);
}

void Display::_drawPlaylist() {
Expand All @@ -321,7 +325,7 @@ void Display::putRequest(displayRequestType_e type, int payload){
requestParams_t request;
request.type = type;
request.payload = payload;
xQueueSend(displayQueue, &request, portMAX_DELAY);
xQueueSend(displayQueue, &request, DSQ_SEND_DELAY);
#ifdef USE_NEXTION
nextion.putRequest(request);
#endif
Expand Down
7 changes: 5 additions & 2 deletions yoRadio/src/core/netserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#ifndef MIN_MALLOC
#define MIN_MALLOC 24112
#endif
#ifndef NSQ_SEND_DELAY
#define NSQ_SEND_DELAY (TickType_t)100 //portMAX_DELAY?
#endif

#ifdef USE_SD
#define CARDLOCK() sdog.tm()
Expand Down Expand Up @@ -710,11 +713,11 @@ void NetServer::requestOnChange(requestType_e request, uint8_t clientId) {
nsRequestParams_t nsrequest;
nsrequest.type = request;
nsrequest.clientId = clientId;
xQueueSend(nsQueue, &nsrequest, portMAX_DELAY);
xQueueSend(nsQueue, &nsrequest, NSQ_SEND_DELAY);
}

void NetServer::resetQueue(){
xQueueReset(nsQueue);
if(nsQueue!=NULL) xQueueReset(nsQueue);
}

String processor(const String& var) { // %Templates%
Expand Down
2 changes: 1 addition & 1 deletion yoRadio/src/core/options.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h

#define YOVERSION "0.9.250"
#define YOVERSION "0.9.259"

/*******************************************************
DO NOT EDIT THIS FILE.
Expand Down
6 changes: 5 additions & 1 deletion yoRadio/src/core/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ void Player::init() {

void Player::sendCommand(playerRequestParams_t request){
if(playerQueue==NULL) return;
xQueueSend(playerQueue, &request, portMAX_DELAY);
xQueueSend(playerQueue, &request, PLQ_SEND_DELAY);
}

void Player::resetQueue(){
if(playerQueue!=NULL) xQueueReset(playerQueue);
}

void Player::stopInfo() {
Expand Down
5 changes: 5 additions & 0 deletions yoRadio/src/core/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#define MQTT_BURL_SIZE 512
#endif

#ifndef PLQ_SEND_DELAY
#define PLQ_SEND_DELAY portMAX_DELAY
#endif

#define PLERR_LN 64
#define SET_PLAY_ERROR(...) {char buff[512 + 64]; sprintf(buff,__VA_ARGS__); setError(buff);}

Expand Down Expand Up @@ -51,6 +55,7 @@ class Player: public Audio {
void setError(const char *e);
bool hasError() { return strlen(_plError)>0; }
void sendCommand(playerRequestParams_t request);
void resetQueue();
#ifdef MQTT_ROOT_TOPIC
void browseUrl();
#endif
Expand Down

0 comments on commit b2a4eb8

Please sign in to comment.