This commit is contained in:
e2002
2023-06-07 14:48:39 +03:00
parent caa5cb78c7
commit b2a4eb8707
7 changed files with 36 additions and 7 deletions

View File

@@ -229,6 +229,10 @@ Work is in progress...
--- ---
## Version history ## 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 #### v0.9.250
- added support for DS1307 or DS3231 RTC module (you need to install the RTCLib library in the library manager) - added support for DS1307 or DS3231 RTC module (you need to install the RTCLib library in the library manager)
- setup - setup

View File

@@ -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 VSPI PINS. SD SCK must be connected to pin 18
SD MISO must be connected to pin 19 SD MISO must be connected to pin 19
SD MOSI must be connected to pin 23 */ 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 */ /* ENCODER2 */
//#define ENC2_BTNL 255 /* Left rotation */ //#define ENC2_BTNL 255 /* Left rotation */

View File

@@ -18,6 +18,10 @@ DspCore dsp;
Page *pages[] = { new Page(), new Page(), new Page() }; Page *pages[] = { new Page(), new Page(), new Page() };
#ifndef DSQ_SEND_DELAY
#define DSQ_SEND_DELAY portMAX_DELAY
#endif
#ifndef CORE_STACK_SIZE #ifndef CORE_STACK_SIZE
#define CORE_STACK_SIZE 1024*3 #define CORE_STACK_SIZE 1024*3
#endif #endif
@@ -298,7 +302,7 @@ void Display::_swichMode(displayMode_e newmode) {
} }
void Display::resetQueue(){ void Display::resetQueue(){
xQueueReset(displayQueue); if(displayQueue!=NULL) xQueueReset(displayQueue);
} }
void Display::_drawPlaylist() { void Display::_drawPlaylist() {
@@ -321,7 +325,7 @@ void Display::putRequest(displayRequestType_e type, int payload){
requestParams_t request; requestParams_t request;
request.type = type; request.type = type;
request.payload = payload; request.payload = payload;
xQueueSend(displayQueue, &request, portMAX_DELAY); xQueueSend(displayQueue, &request, DSQ_SEND_DELAY);
#ifdef USE_NEXTION #ifdef USE_NEXTION
nextion.putRequest(request); nextion.putRequest(request);
#endif #endif

View File

@@ -15,6 +15,9 @@
#ifndef MIN_MALLOC #ifndef MIN_MALLOC
#define MIN_MALLOC 24112 #define MIN_MALLOC 24112
#endif #endif
#ifndef NSQ_SEND_DELAY
#define NSQ_SEND_DELAY (TickType_t)100 //portMAX_DELAY?
#endif
#ifdef USE_SD #ifdef USE_SD
#define CARDLOCK() sdog.tm() #define CARDLOCK() sdog.tm()
@@ -710,11 +713,11 @@ void NetServer::requestOnChange(requestType_e request, uint8_t clientId) {
nsRequestParams_t nsrequest; nsRequestParams_t nsrequest;
nsrequest.type = request; nsrequest.type = request;
nsrequest.clientId = clientId; nsrequest.clientId = clientId;
xQueueSend(nsQueue, &nsrequest, portMAX_DELAY); xQueueSend(nsQueue, &nsrequest, NSQ_SEND_DELAY);
} }
void NetServer::resetQueue(){ void NetServer::resetQueue(){
xQueueReset(nsQueue); if(nsQueue!=NULL) xQueueReset(nsQueue);
} }
String processor(const String& var) { // %Templates% String processor(const String& var) { // %Templates%

View File

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

View File

@@ -72,7 +72,11 @@ void Player::init() {
void Player::sendCommand(playerRequestParams_t request){ void Player::sendCommand(playerRequestParams_t request){
if(playerQueue==NULL) return; 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() { void Player::stopInfo() {

View File

@@ -12,6 +12,10 @@
#define MQTT_BURL_SIZE 512 #define MQTT_BURL_SIZE 512
#endif #endif
#ifndef PLQ_SEND_DELAY
#define PLQ_SEND_DELAY portMAX_DELAY
#endif
#define PLERR_LN 64 #define PLERR_LN 64
#define SET_PLAY_ERROR(...) {char buff[512 + 64]; sprintf(buff,__VA_ARGS__); setError(buff);} #define SET_PLAY_ERROR(...) {char buff[512 + 64]; sprintf(buff,__VA_ARGS__); setError(buff);}
@@ -51,6 +55,7 @@ class Player: public Audio {
void setError(const char *e); void setError(const char *e);
bool hasError() { return strlen(_plError)>0; } bool hasError() { return strlen(_plError)>0; }
void sendCommand(playerRequestParams_t request); void sendCommand(playerRequestParams_t request);
void resetQueue();
#ifdef MQTT_ROOT_TOPIC #ifdef MQTT_ROOT_TOPIC
void browseUrl(); void browseUrl();
#endif #endif