n5110_crash_fix_127

This commit is contained in:
e2002
2023-03-26 21:28:22 +03:00
parent 4c9f1bdbb0
commit d2193350f8
8 changed files with 21 additions and 9 deletions

View File

@@ -104,7 +104,7 @@ static inline bool _init_async_event_queue(){
}
static inline bool _send_async_event(lwip_event_packet_t ** e){
return _async_queue && xQueueSend(_async_queue, e, portMAX_DELAY) == pdPASS;
return _async_queue && xQueueSend(_async_queue, e, SEND_ASYNC_EVENT_DELAY) == pdPASS;
}
static inline bool _prepend_async_event(lwip_event_packet_t ** e){

View File

@@ -46,7 +46,9 @@ extern "C" {
#ifndef XQUEUE_SIZE
#define XQUEUE_SIZE 128 // (32)
#endif
#ifndef SEND_ASYNC_EVENT_DELAY
#define SEND_ASYNC_EVENT_DELAY portMAX_DELAY
#endif
class AsyncClient;
#define ASYNC_MAX_ACK_TIME 5000

View File

@@ -1,7 +1,7 @@
#ifndef options_h
#define options_h
#define YOVERSION "0.9.122"
#define YOVERSION "0.9.127"
/*******************************************************
DO NOT EDIT THIS FILE.
@@ -257,6 +257,9 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
#ifndef MUTE_VAL
#define MUTE_VAL HIGH // Write this to MUTE_PIN when player is stopped
#endif
#ifndef MUTE_LOCK
#define MUTE_LOCK false // for vs1053 Shield rev2 - lock MUTE_PIN to !MUTE_VAL
#endif
#ifndef BRIGHTNESS_PIN
#define BRIGHTNESS_PIN 255 // BRIGHTNESS Pin
#endif

View File

@@ -37,7 +37,8 @@ void Player::init() {
Serial.print("##[BOOT]#\tplayer.init\t");
playerQueue=NULL;
playerQueue = xQueueCreate( 5, sizeof( playerRequestParams_t ) );
setOutputPins(false);
delay(50);
memset(_plError, 0, PLERR_LN);
#ifdef MQTT_ROOT_TOPIC
memset(burl, 0, MQTT_BURL_SIZE);
@@ -56,7 +57,7 @@ void Player::init() {
setTone(config.store.bass, config.store.middle, config.store.trebble);
setVolume(0);
_status = STOPPED;
setOutputPins(false);
//setOutputPins(false);
_volTimer=false;
playmutex = xSemaphoreCreateMutex();
randomSeed(analogRead(0));
@@ -159,7 +160,8 @@ void Player::loop() {
void Player::setOutputPins(bool isPlaying) {
if(LED_BUILTIN!=255) digitalWrite(LED_BUILTIN, LED_INVERT?!isPlaying:isPlaying);
if(MUTE_PIN!=255) digitalWrite(MUTE_PIN, isPlaying?!MUTE_VAL:MUTE_VAL);
bool _ml = MUTE_LOCK?!MUTE_VAL:(isPlaying?!MUTE_VAL:MUTE_VAL);
if(MUTE_PIN!=255) digitalWrite(MUTE_PIN, _ml);
}
void Player::_play(uint16_t stationId) {

View File

@@ -5,8 +5,8 @@
More info on https://github.com/e2002/yoradio/wiki/Widgets#widgets-description
*************************************************************************************/
#ifndef displayLCD1602conf_h
#define displayLCD1602conf_h
#ifndef displayLCD2004conf_h
#define displayLCD2004conf_h
#define DSP_WIDTH 20
#define TFT_FRAMEWDT 0

View File

@@ -180,8 +180,9 @@ void DspCore::clearClock(){
void DspCore::loop(bool force) {
if(digitalRead(TFT_CS)==LOW) return;
display();
delay(5);
delay(10);
}
void DspCore::charSize(uint8_t textsize, uint8_t& width, uint16_t& height){

View File

@@ -265,6 +265,9 @@ void SliderWidget::_clear() {
// _oldvalwidth = 0;
dsp.fillRect(_config.left, _config.top, _width, _height, _bgcolor);
}
void SliderWidget::_reset() {
_oldvalwidth = 0;
}
/************************
VU WIDGET
************************/

View File

@@ -191,6 +191,7 @@ class SliderWidget: public Widget {
void _draw();
void _drawslider();
void _clear();
void _reset();
};
class VuWidget: public Widget {