v0.9.720
This commit is contained in:
10
README.md
10
README.md
@@ -235,6 +235,16 @@ Work is in progress...
|
|||||||
|
|
||||||
---
|
---
|
||||||
## Version history
|
## Version history
|
||||||
|
#### v0.9.720
|
||||||
|
- PR #211 https://github.com/e2002/yoradio/pull/211
|
||||||
|
- fix packets lost in HLS-TS
|
||||||
|
- fix stuttering if datatransfer is chunked
|
||||||
|
- split processWebStream/processWebFile
|
||||||
|
- fixed the error of connecting to the next access points from the list if the first one is unavailable
|
||||||
|
- fixed playback control errors from Home Assistant
|
||||||
|
- the DEF_SPI_FREQ parameter, intended for setting the user speed SPI of displays, has been removed from the settings (they work fine anyway)
|
||||||
|
- fixed an error connecting to the MQTT server during initial boot in SDCARD mode
|
||||||
|
|
||||||
#### v0.9.711
|
#### v0.9.711
|
||||||
- fixed compilation error for LCD displays #210
|
- fixed compilation error for LCD displays #210
|
||||||
|
|
||||||
|
|||||||
@@ -3147,7 +3147,7 @@ void Audio::processWebStream() {
|
|||||||
if(InBuff.bufferFilled() > maxFrameSize) {f_tmr_1s = false; cnt_slow = 0; loopCnt = 0;}
|
if(InBuff.bufferFilled() > maxFrameSize) {f_tmr_1s = false; cnt_slow = 0; loopCnt = 0;}
|
||||||
if(f_tmr_1s){
|
if(f_tmr_1s){
|
||||||
cnt_slow ++;
|
cnt_slow ++;
|
||||||
if(cnt_slow > 50){cnt_slow = 0; AUDIO_INFO("slow stream, dropouts are possible");}
|
if(cnt_slow > 50){cnt_slow = 0; f_tmr_1s = false; AUDIO_INFO("slow stream, dropouts are possible");}
|
||||||
}
|
}
|
||||||
// if the buffer can't filled for several seconds try a new connection - - - - - - - - - - - - - - - - - - - - - - -
|
// if the buffer can't filled for several seconds try a new connection - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if(f_stream && !availableBytes){
|
if(f_stream && !availableBytes){
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
#include "mqtt.h"
|
#include "mqtt.h"
|
||||||
#include "WiFi.h"
|
#include "WiFi.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "commandhandler.h"
|
||||||
|
|
||||||
AsyncMqttClient mqttClient;
|
AsyncMqttClient mqttClient;
|
||||||
TimerHandle_t mqttReconnectTimer;
|
TimerHandle_t mqttReconnectTimer;
|
||||||
char topic[100], status[BUFLEN*2];
|
char topic[100], status[BUFLEN*2];
|
||||||
|
|
||||||
void connectToMqtt() {
|
void connectToMqtt() {
|
||||||
//config.waitConnection();
|
|
||||||
mqttClient.connect();
|
mqttClient.connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,20 +82,7 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
|
|||||||
char buf[len+1];
|
char buf[len+1];
|
||||||
strncpy(buf, payload, len);
|
strncpy(buf, payload, len);
|
||||||
buf[len]='\0';
|
buf[len]='\0';
|
||||||
if (strcmp(buf, "prev") == 0) { player.sendCommand({PR_PREV, 0}); return; }
|
if(cmd.exec(buf, "")) return;
|
||||||
if (strcmp(buf, "next") == 0) { player.sendCommand({PR_NEXT, 0}); return; }
|
|
||||||
if (strcmp(buf, "toggle") == 0) { player.sendCommand({PR_TOGGLE, 0}); return; }
|
|
||||||
if (strcmp(buf, "stop") == 0) { player.sendCommand({PR_STOP, 0}); return; }
|
|
||||||
if (strcmp(buf, "start") == 0 || strcmp(buf, "play") == 0) { player.sendCommand({PR_PLAY, config.lastStation()}); return; }
|
|
||||||
if (strcmp(buf, "boot") == 0 || strcmp(buf, "reboot") == 0) { ESP.restart(); return; }
|
|
||||||
if (strcmp(buf, "volm") == 0) {
|
|
||||||
player.stepVol(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (strcmp(buf, "volp") == 0) {
|
|
||||||
player.stepVol(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (strcmp(buf, "turnoff") == 0) {
|
if (strcmp(buf, "turnoff") == 0) {
|
||||||
uint8_t sst = config.store.smartstart;
|
uint8_t sst = config.store.smartstart;
|
||||||
config.setDspOn(0);
|
config.setDspOn(0);
|
||||||
|
|||||||
@@ -58,25 +58,16 @@ bool MyNetwork::wifiBegin(bool silent){
|
|||||||
uint8_t ls = (config.store.lastSSID == 0 || config.store.lastSSID > config.ssidsCount) ? 0 : config.store.lastSSID - 1;
|
uint8_t ls = (config.store.lastSSID == 0 || config.store.lastSSID > config.ssidsCount) ? 0 : config.store.lastSSID - 1;
|
||||||
uint8_t startedls = ls;
|
uint8_t startedls = ls;
|
||||||
uint8_t errcnt = 0;
|
uint8_t errcnt = 0;
|
||||||
WiFi.mode(WIFI_STA);
|
//WiFi.mode(WIFI_STA);
|
||||||
/*
|
|
||||||
char buf[MDNS_LENGTH];
|
|
||||||
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE);
|
|
||||||
if(strlen(config.store.mdnsname)>0){
|
|
||||||
WiFi.setHostname(config.store.mdnsname);
|
|
||||||
}else{
|
|
||||||
snprintf(buf, MDNS_LENGTH, "yoradio-%x", config.getChipId());
|
|
||||||
WiFi.setHostname(buf);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if(!silent){
|
if(!silent){
|
||||||
Serial.printf("##[BOOT]#\tAttempt to connect to %s\n", config.ssids[ls].ssid);
|
Serial.printf("##[BOOT]#\tAttempt to connect to %s\n", config.ssids[ls].ssid);
|
||||||
Serial.print("##[BOOT]#\t");
|
Serial.print("##[BOOT]#\t");
|
||||||
display.putRequest(BOOTSTRING, ls);
|
display.putRequest(BOOTSTRING, ls);
|
||||||
}
|
}
|
||||||
WiFi.disconnect(true, true); //disconnect & erase internal credentials https://github.com/e2002/yoradio/pull/164/commits/89d8b4450dde99cd7930b84bb14d81dab920b879
|
//WiFi.disconnect(true, true); //disconnect & erase internal credentials https://github.com/e2002/yoradio/pull/164/commits/89d8b4450dde99cd7930b84bb14d81dab920b879
|
||||||
delay(100);
|
//delay(100);
|
||||||
|
WiFi.mode(WIFI_STA);
|
||||||
WiFi.begin(config.ssids[ls].ssid, config.ssids[ls].password);
|
WiFi.begin(config.ssids[ls].ssid, config.ssids[ls].password);
|
||||||
while (WiFi.status() != WL_CONNECTED) {
|
while (WiFi.status() != WL_CONNECTED) {
|
||||||
if(!silent) Serial.print(".");
|
if(!silent) Serial.print(".");
|
||||||
@@ -88,6 +79,7 @@ bool MyNetwork::wifiBegin(bool silent){
|
|||||||
ls++;
|
ls++;
|
||||||
if (ls > config.ssidsCount - 1) ls = 0;
|
if (ls > config.ssidsCount - 1) ls = 0;
|
||||||
if(!silent) Serial.println();
|
if(!silent) Serial.println();
|
||||||
|
WiFi.mode(WIFI_OFF);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,6 +104,9 @@ void searchWiFi(void * pvParameters){
|
|||||||
telnet.begin(true);
|
telnet.begin(true);
|
||||||
network.setWifiParams();
|
network.setWifiParams();
|
||||||
display.putRequest(NEWIP, 0);
|
display.putRequest(NEWIP, 0);
|
||||||
|
#ifdef MQTT_ROOT_TOPIC
|
||||||
|
mqttInit();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
vTaskDelete( NULL );
|
vTaskDelete( NULL );
|
||||||
}
|
}
|
||||||
@@ -134,6 +129,9 @@ void MyNetwork::begin() {
|
|||||||
Serial.println(".");
|
Serial.println(".");
|
||||||
status = CONNECTED;
|
status = CONNECTED;
|
||||||
setWifiParams();
|
setWifiParams();
|
||||||
|
#ifdef MQTT_ROOT_TOPIC
|
||||||
|
mqttInit();
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
status = SDREADY;
|
status = SDREADY;
|
||||||
xTaskCreatePinnedToCore(searchWiFi, "searchWiFi", 1024 * 4, NULL, 0, NULL, SEARCH_WIFI_CORE_ID);
|
xTaskCreatePinnedToCore(searchWiFi, "searchWiFi", 1024 * 4, NULL, 0, NULL, SEARCH_WIFI_CORE_ID);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#define options_h
|
#define options_h
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define YOVERSION "0.9.711"
|
#define YOVERSION "0.9.720"
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
DO NOT EDIT THIS FILE.
|
DO NOT EDIT THIS FILE.
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 24000000 /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_GC9106Ex(&SPI2, TFT_DC, TFT_CS, TFT_RST) {}
|
DspCore::DspCore(): Adafruit_GC9106Ex(&SPI2, TFT_DC, TFT_CS, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -14,7 +10,7 @@ DspCore::DspCore(): Adafruit_GC9106Ex(TFT_CS, TFT_DC, TFT_RST) {}
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
begin(DEF_SPI_FREQ);
|
begin();
|
||||||
cp437(true);
|
cp437(true);
|
||||||
invert();
|
invert();
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_GC9A01A(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
DspCore::DspCore(): Adafruit_GC9A01A(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -15,7 +11,6 @@ DspCore::DspCore(): Adafruit_GC9A01A(TFT_CS, TFT_DC, TFT_RST) {}
|
|||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
begin();
|
begin();
|
||||||
if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
|
||||||
invert();
|
invert();
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): ILI9486_SPI(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
DspCore::DspCore(): ILI9486_SPI(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -16,7 +12,6 @@
|
|||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
setSpiKludge(false);
|
setSpiKludge(false);
|
||||||
init();
|
init();
|
||||||
//if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
|
||||||
cp437(true);
|
cp437(true);
|
||||||
setTextWrap(false);
|
setTextWrap(false);
|
||||||
setTextSize(1);
|
setTextSize(1);
|
||||||
|
|||||||
@@ -7,15 +7,11 @@
|
|||||||
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32 or scan it https://create.arduino.cc/projecthub/abdularbi17/how-to-scan-i2c-address-in-arduino-eaadda
|
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32 or scan it https://create.arduino.cc/projecthub/abdularbi17/how-to-scan-i2c-address-in-arduino-eaadda
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_MODEL==DSP_SSD1305
|
#if DSP_MODEL==DSP_SSD1305
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_SSD1305(128, 64, &SPI2, TFT_DC, TFT_RST, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): Adafruit_SSD1305(128, 64, &SPI2, TFT_DC, TFT_RST, TFT_CS) {}
|
||||||
#else
|
#else
|
||||||
DspCore::DspCore(): Adafruit_SSD1305(128, 64, &SPI, TFT_DC, TFT_RST, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): Adafruit_SSD1305(128, 64, &SPI, TFT_DC, TFT_RST, TFT_CS) {}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
|||||||
@@ -3,17 +3,14 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 16000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
#ifndef SSD1322_GRAYSCALE
|
#ifndef SSD1322_GRAYSCALE
|
||||||
#define SSD1322_GRAYSCALE false
|
#define SSD1322_GRAYSCALE false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Jamis_SSD1322(256, 64, &SPI2, TFT_DC, TFT_RST, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): Jamis_SSD1322(256, 64, &SPI2, TFT_DC, TFT_RST, TFT_CS) {}
|
||||||
#else
|
#else
|
||||||
DspCore::DspCore(): Jamis_SSD1322(256, 64, &SPI, TFT_DC, TFT_RST, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): Jamis_SSD1322(256, 64, &SPI, TFT_DC, TFT_RST, TFT_CS) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 0 //26000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_ST7735(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
DspCore::DspCore(): Adafruit_ST7735(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -15,7 +11,6 @@ DspCore::DspCore(): Adafruit_ST7735(&SPI, TFT_CS, TFT_DC, TFT_RST) {}
|
|||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
initR(DTYPE);
|
initR(DTYPE);
|
||||||
if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
|
||||||
cp437(true);
|
cp437(true);
|
||||||
invert();
|
invert();
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_ST7789(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
DspCore::DspCore(): Adafruit_ST7789(&SPI2, TFT_CS, TFT_DC, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -21,7 +17,6 @@ void DspCore::initDisplay() {
|
|||||||
}else{
|
}else{
|
||||||
init(240,(DSP_MODEL==DSP_ST7789)?320:240);
|
init(240,(DSP_MODEL==DSP_ST7789)?320:240);
|
||||||
}
|
}
|
||||||
if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
|
||||||
invert();
|
invert();
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 40000000UL /* set it to 0 for system default */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): Adafruit_ST7796S_kbv(&SPI2, TFT_DC, TFT_CS, TFT_RST) {}
|
DspCore::DspCore(): Adafruit_ST7796S_kbv(&SPI2, TFT_DC, TFT_CS, TFT_RST) {}
|
||||||
#else
|
#else
|
||||||
@@ -15,7 +11,6 @@ DspCore::DspCore(): Adafruit_ST7796S_kbv(TFT_CS, TFT_DC, TFT_RST) {}
|
|||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
begin();
|
begin();
|
||||||
if(DEF_SPI_FREQ > 0) setSPISpeed(DEF_SPI_FREQ);
|
|
||||||
invert();
|
invert();
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -3,14 +3,10 @@
|
|||||||
#include "dspcore.h"
|
#include "dspcore.h"
|
||||||
#include "../core/config.h"
|
#include "../core/config.h"
|
||||||
|
|
||||||
#ifndef DEF_SPI_FREQ
|
|
||||||
#define DEF_SPI_FREQ 8000000UL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DSP_HSPI
|
#if DSP_HSPI
|
||||||
DspCore::DspCore(): ST7920(&SPI2, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): ST7920(&SPI2, TFT_CS) {}
|
||||||
#else
|
#else
|
||||||
DspCore::DspCore(): ST7920(&SPI, TFT_CS, DEF_SPI_FREQ) {}
|
DspCore::DspCore(): ST7920(&SPI, TFT_CS) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DspCore::initDisplay() {
|
void DspCore::initDisplay() {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "core/network.h"
|
#include "core/network.h"
|
||||||
#include "core/netserver.h"
|
#include "core/netserver.h"
|
||||||
#include "core/controls.h"
|
#include "core/controls.h"
|
||||||
#include "core/mqtt.h"
|
//#include "core/mqtt.h"
|
||||||
#include "core/optionschecker.h"
|
#include "core/optionschecker.h"
|
||||||
#include "core/timekeeper.h"
|
#include "core/timekeeper.h"
|
||||||
#ifdef USE_NEXTION
|
#ifdef USE_NEXTION
|
||||||
@@ -94,9 +94,6 @@ void setup() {
|
|||||||
initControls();
|
initControls();
|
||||||
display.putRequest(DSP_START);
|
display.putRequest(DSP_START);
|
||||||
while(!display.ready()) delay(10);
|
while(!display.ready()) delay(10);
|
||||||
#ifdef MQTT_ROOT_TOPIC
|
|
||||||
mqttInit();
|
|
||||||
#endif
|
|
||||||
#if USE_OTA
|
#if USE_OTA
|
||||||
setupOTA();
|
setupOTA();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user