v0.8.089
This commit is contained in:
@@ -301,6 +301,12 @@ Work is in progress...
|
|||||||
|
|
||||||
---
|
---
|
||||||
## Version history
|
## Version history
|
||||||
|
#### v0.8.089
|
||||||
|
- increased length of SSID string to 30 characters (requires full update + ESP32 Data Upload)
|
||||||
|
- fixed artifacts when adjusting the volume on OLED displays
|
||||||
|
- fixed bug with missing current station in playlist on OLED displays
|
||||||
|
- new parameter DSP_INVERT_TITLE - invert colors in station name for OLED displays (more details in exsamples/myoptions.h)
|
||||||
|
|
||||||
#### v0.8.03b
|
#### v0.8.03b
|
||||||
- added support for ST7796 display
|
- added support for ST7796 display
|
||||||
- added support for capacitive touch GT911
|
- added support for capacitive touch GT911
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
|
|||||||
/* For sample #define ENC_BTNB 36 - next line - #define WAKE_PIN ENC_BTNB */
|
/* For sample #define ENC_BTNB 36 - next line - #define WAKE_PIN ENC_BTNB */
|
||||||
//#define LIGHT_SENSOR 255 /* Light sensor */
|
//#define LIGHT_SENSOR 255 /* Light sensor */
|
||||||
//#define AUTOBACKLIGHT(x) *function* /* Autobacklight function. See options.h for exsample */
|
//#define AUTOBACKLIGHT(x) *function* /* Autobacklight function. See options.h for exsample */
|
||||||
|
//#define DSP_INVERT_TITLE true /* Invert title colors for OLED displays ? */
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
|
||||||
/* IR control */
|
/* IR control */
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
<div class="flex-row credential">
|
<div class="flex-row credential">
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">ssid</span>
|
<span class="inputtitle">ssid</span>
|
||||||
<input type="text" id="ssid0" class="textinput" name="ssid" value="" maxlength="20" autocomplete="off" />
|
<input type="text" id="ssid0" class="textinput" name="ssid" value="" maxlength="30" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">pass</span>
|
<span class="inputtitle">pass</span>
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
<div class="flex-row credential">
|
<div class="flex-row credential">
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">ssid</span>
|
<span class="inputtitle">ssid</span>
|
||||||
<input type="text" id="ssid1" class="textinput" name="ssid" maxlength="20" autocomplete="off" />
|
<input type="text" id="ssid1" class="textinput" name="ssid" maxlength="30" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">pass</span>
|
<span class="inputtitle">pass</span>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
<div class="flex-row credential">
|
<div class="flex-row credential">
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">ssid</span>
|
<span class="inputtitle">ssid</span>
|
||||||
<input type="text" id="ssid2" class="textinput" name="ssid" value="" maxlength="20" autocomplete="off" />
|
<input type="text" id="ssid2" class="textinput" name="ssid" value="" maxlength="30" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">pass</span>
|
<span class="inputtitle">pass</span>
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<div class="flex-row credential">
|
<div class="flex-row credential">
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">ssid</span>
|
<span class="inputtitle">ssid</span>
|
||||||
<input type="text" id="ssid3" class="textinput" name="ssid" value="" maxlength="20" autocomplete="off" />
|
<input type="text" id="ssid3" class="textinput" name="ssid" value="" maxlength="30" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">pass</span>
|
<span class="inputtitle">pass</span>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
<div class="flex-row credential">
|
<div class="flex-row credential">
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">ssid</span>
|
<span class="inputtitle">ssid</span>
|
||||||
<input type="text" id="ssid4" class="textinput" name="ssid" value="" maxlength="20" autocomplete="off" />
|
<input type="text" id="ssid4" class="textinput" name="ssid" value="" maxlength="30" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrap">
|
<div class="inputwrap">
|
||||||
<span class="inputtitle">pass</span>
|
<span class="inputtitle">pass</span>
|
||||||
|
|||||||
@@ -434,8 +434,8 @@ bool Config::parseSsid(const char* line, char* ssid, char* pass) {
|
|||||||
tmpe = strstr(line, "\t");
|
tmpe = strstr(line, "\t");
|
||||||
if (tmpe == NULL) return false;
|
if (tmpe == NULL) return false;
|
||||||
uint16_t pos = tmpe - line;
|
uint16_t pos = tmpe - line;
|
||||||
if (pos > 19 || strlen(line) > 61) return false;
|
if (pos > 29 || strlen(line) > 71) return false;
|
||||||
memset(ssid, 0, 20);
|
memset(ssid, 0, 30);
|
||||||
strlcpy(ssid, line, pos + 1);
|
strlcpy(ssid, line, pos + 1);
|
||||||
memset(pass, 0, 40);
|
memset(pass, 0, 40);
|
||||||
strlcpy(pass, line + pos + 1, strlen(line) - pos);
|
strlcpy(pass, line + pos + 1, strlen(line) - pos);
|
||||||
@@ -467,11 +467,11 @@ bool Config::initNetwork() {
|
|||||||
if (!file || file.isDirectory()) {
|
if (!file || file.isDirectory()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
char ssidval[20], passval[40];
|
char ssidval[30], passval[40];
|
||||||
byte c = 0;
|
byte c = 0;
|
||||||
while (file.available()) {
|
while (file.available()) {
|
||||||
if (parseSsid(file.readStringUntil('\n').c_str(), ssidval, passval)) {
|
if (parseSsid(file.readStringUntil('\n').c_str(), ssidval, passval)) {
|
||||||
strlcpy(ssids[c].ssid, ssidval, 20);
|
strlcpy(ssids[c].ssid, ssidval, 30);
|
||||||
strlcpy(ssids[c].password, passval, 40);
|
strlcpy(ssids[c].password, passval, 40);
|
||||||
ssidsCount++;
|
ssidsCount++;
|
||||||
c++;
|
c++;
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ struct station_t
|
|||||||
|
|
||||||
struct neworkItem
|
struct neworkItem
|
||||||
{
|
{
|
||||||
char ssid[20];
|
char ssid[30];
|
||||||
char password[40];
|
char password[40];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef options_h
|
#ifndef options_h
|
||||||
#define options_h
|
#define options_h
|
||||||
|
|
||||||
#define VERSION "0.8.03b"
|
#define VERSION "0.8.089"
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
DO NOT EDIT THIS FILE.
|
DO NOT EDIT THIS FILE.
|
||||||
@@ -264,6 +264,9 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
|
|||||||
#endif
|
#endif
|
||||||
#define AUTOBACKLIGHT(x) ({uint16_t _lh=(x>AUTOBACKLIGHT_MAX?AUTOBACKLIGHT_MAX:x); map(_lh, AUTOBACKLIGHT_MAX, 0, AUTOBACKLIGHT_MIN, 100);}) // autobacklight function
|
#define AUTOBACKLIGHT(x) ({uint16_t _lh=(x>AUTOBACKLIGHT_MAX?AUTOBACKLIGHT_MAX:x); map(_lh, AUTOBACKLIGHT_MAX, 0, AUTOBACKLIGHT_MIN, 100);}) // autobacklight function
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef DSP_INVERT_TITLE
|
||||||
|
#define DSP_INVERT_TITLE true // Invert title colors for OLED displays ?
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
*** ST7735 display submodel ***
|
*** ST7735 display submodel ***
|
||||||
INITR_BLACKTAB // 1.8' https://aliexpress.ru/item/1005002822797745.html
|
INITR_BLACKTAB // 1.8' https://aliexpress.ru/item/1005002822797745.html
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ void Telnet::on_input(const char* str, byte clientId) {
|
|||||||
printf(clientId, "##WIFI.STATION#\n> ");
|
printf(clientId, "##WIFI.STATION#\n> ");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char newssid[20], newpass[40];
|
char newssid[30], newpass[40];
|
||||||
if (sscanf(str, "wifi.con(\"%[^\"]\",\"%[^\"]\")", newssid, newpass) == 2 || sscanf(str, "wifi.con(%[^,],%[^)])", newssid, newpass) == 2 || sscanf(str, "wifi.con(%[^ ] %[^)])", newssid, newpass) == 2 || sscanf(str, "wifi %[^ ] %s", newssid, newpass) == 2) {
|
if (sscanf(str, "wifi.con(\"%[^\"]\",\"%[^\"]\")", newssid, newpass) == 2 || sscanf(str, "wifi.con(%[^,],%[^)])", newssid, newpass) == 2 || sscanf(str, "wifi.con(%[^ ] %[^)])", newssid, newpass) == 2 || sscanf(str, "wifi %[^ ] %s", newssid, newpass) == 2) {
|
||||||
char buf[BUFLEN];
|
char buf[BUFLEN];
|
||||||
snprintf(buf, BUFLEN, "New SSID: \"%s\" with PASS: \"%s\" for next boot\n> ", newssid, newpass);
|
snprintf(buf, BUFLEN, "New SSID: \"%s\" with PASS: \"%s\" for next boot\n> ", newssid, newpass);
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ void DspCore::initDisplay() {
|
|||||||
config.theme.buffer = TFT_FG;
|
config.theme.buffer = TFT_FG;
|
||||||
config.theme.volbarout = TFT_FG;
|
config.theme.volbarout = TFT_FG;
|
||||||
config.theme.volbarin = TFT_FG;
|
config.theme.volbarin = TFT_FG;
|
||||||
|
config.theme.plcurrent = TFT_BG;
|
||||||
|
config.theme.plcurrentbg = TFT_FG;
|
||||||
|
config.theme.plcurrentfill = TFT_FG;
|
||||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||||
|
|
||||||
setContrast(config.store.contrast);
|
setContrast(config.store.contrast);
|
||||||
|
|||||||
@@ -49,25 +49,7 @@ void DspCore::initDisplay() {
|
|||||||
Serial.println(F("SH110X allocation failed"));
|
Serial.println(F("SH110X allocation failed"));
|
||||||
for (;;); // Don't proceed, loop forever
|
for (;;); // Don't proceed, loop forever
|
||||||
}
|
}
|
||||||
config.theme.background = TFT_BG;
|
#include "tools/oledcolorfix.h"
|
||||||
config.theme.meta = TFT_BG;
|
|
||||||
config.theme.clock = TFT_FG;
|
|
||||||
config.theme.weather = TFT_FG;
|
|
||||||
config.theme.metabg = TFT_FG;
|
|
||||||
config.theme.metafill = TFT_FG;
|
|
||||||
config.theme.title1 = TFT_FG;
|
|
||||||
config.theme.title2 = TFT_FG;
|
|
||||||
config.theme.rssi = TFT_FG;
|
|
||||||
config.theme.ip = TFT_FG;
|
|
||||||
config.theme.vol = TFT_FG;
|
|
||||||
config.theme.bitrate = TFT_FG;
|
|
||||||
config.theme.digit = TFT_FG;
|
|
||||||
config.theme.buffer = TFT_FG;
|
|
||||||
config.theme.volbarout = TFT_FG;
|
|
||||||
config.theme.volbarin = TFT_FG;
|
|
||||||
|
|
||||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
|
||||||
|
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
invert();
|
invert();
|
||||||
|
|||||||
@@ -53,24 +53,7 @@ void DspCore::initDisplay() {
|
|||||||
Serial.println(F("SSD1305 allocation failed"));
|
Serial.println(F("SSD1305 allocation failed"));
|
||||||
for (;;); // Don't proceed, loop forever
|
for (;;); // Don't proceed, loop forever
|
||||||
}
|
}
|
||||||
config.theme.background = TFT_BG;
|
#include "tools/oledcolorfix.h"
|
||||||
config.theme.meta = TFT_BG;
|
|
||||||
config.theme.clock = TFT_FG;
|
|
||||||
config.theme.weather = TFT_FG;
|
|
||||||
config.theme.metabg = TFT_FG;
|
|
||||||
config.theme.metafill = TFT_FG;
|
|
||||||
config.theme.title1 = TFT_FG;
|
|
||||||
config.theme.title2 = TFT_FG;
|
|
||||||
config.theme.rssi = TFT_FG;
|
|
||||||
config.theme.ip = TFT_FG;
|
|
||||||
config.theme.vol = TFT_FG;
|
|
||||||
config.theme.bitrate = TFT_FG;
|
|
||||||
config.theme.digit = TFT_FG;
|
|
||||||
config.theme.buffer = TFT_FG;
|
|
||||||
config.theme.volbarout = TFT_FG;
|
|
||||||
config.theme.volbarin = TFT_FG;
|
|
||||||
|
|
||||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
|
||||||
|
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
|
|||||||
@@ -45,24 +45,7 @@ void DspCore::initDisplay() {
|
|||||||
Serial.println(F("SSD1306 allocation failed"));
|
Serial.println(F("SSD1306 allocation failed"));
|
||||||
for (;;); // Don't proceed, loop forever
|
for (;;); // Don't proceed, loop forever
|
||||||
}
|
}
|
||||||
config.theme.background = TFT_BG;
|
#include "tools/oledcolorfix.h"
|
||||||
config.theme.meta = TFT_BG;
|
|
||||||
config.theme.clock = TFT_FG;
|
|
||||||
config.theme.weather = TFT_FG;
|
|
||||||
config.theme.metabg = TFT_FG;
|
|
||||||
config.theme.metafill = TFT_FG;
|
|
||||||
config.theme.title1 = TFT_FG;
|
|
||||||
config.theme.title2 = TFT_FG;
|
|
||||||
config.theme.rssi = TFT_FG;
|
|
||||||
config.theme.ip = TFT_FG;
|
|
||||||
config.theme.vol = TFT_FG;
|
|
||||||
config.theme.bitrate = TFT_FG;
|
|
||||||
config.theme.digit = TFT_FG;
|
|
||||||
config.theme.buffer = TFT_FG;
|
|
||||||
config.theme.volbarout = TFT_FG;
|
|
||||||
config.theme.volbarin = TFT_FG;
|
|
||||||
|
|
||||||
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
|
||||||
cp437(true);
|
cp437(true);
|
||||||
flip();
|
flip();
|
||||||
invert();
|
invert();
|
||||||
|
|||||||
32
yoRadio/src/displays/tools/oledcolorfix.h
Normal file
32
yoRadio/src/displays/tools/oledcolorfix.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef _OLEDCOLORFIX_H_
|
||||||
|
#define _OLEDCOLORFIX_H_
|
||||||
|
|
||||||
|
config.theme.background = TFT_BG;
|
||||||
|
#if DSP_INVERT_TITLE
|
||||||
|
config.theme.meta = TFT_BG;
|
||||||
|
config.theme.metabg = TFT_FG;
|
||||||
|
config.theme.metafill = TFT_FG;
|
||||||
|
#else
|
||||||
|
config.theme.meta = TFT_FG;
|
||||||
|
config.theme.metabg = TFT_BG;
|
||||||
|
config.theme.metafill = TFT_BG;
|
||||||
|
#endif
|
||||||
|
config.theme.clock = TFT_FG;
|
||||||
|
config.theme.weather = TFT_FG;
|
||||||
|
config.theme.title1 = TFT_FG;
|
||||||
|
config.theme.title2 = TFT_FG;
|
||||||
|
config.theme.rssi = TFT_FG;
|
||||||
|
config.theme.ip = TFT_FG;
|
||||||
|
config.theme.vol = TFT_FG;
|
||||||
|
config.theme.bitrate = TFT_FG;
|
||||||
|
config.theme.digit = TFT_FG;
|
||||||
|
config.theme.buffer = TFT_FG;
|
||||||
|
config.theme.volbarout = TFT_FG;
|
||||||
|
config.theme.volbarin = TFT_FG;
|
||||||
|
config.theme.plcurrent = TFT_BG;
|
||||||
|
config.theme.plcurrentbg = TFT_FG;
|
||||||
|
config.theme.plcurrentfill = TFT_FG;
|
||||||
|
for(byte i=0;i<5;i++) config.theme.playlist[i] = TFT_FG;
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -376,7 +376,11 @@ void NumWidget::setText(const char* txt) {
|
|||||||
strlcpy(_text, txt, _buffsize);
|
strlcpy(_text, txt, _buffsize);
|
||||||
_getBounds();
|
_getBounds();
|
||||||
if (strcmp(_oldtext, _text) == 0) return;
|
if (strcmp(_oldtext, _text) == 0) return;
|
||||||
if (_active) dsp.fillRect(_oldleft == 0 ? _realLeft() : min(_oldleft, _realLeft()), _config.top-_textheight+1, max(_oldtextwidth, _textwidth), _textheight, _bgcolor);
|
uint16_t realth = _textheight;
|
||||||
|
#ifdef DSP_OLED
|
||||||
|
realth = _textheight*CHARHEIGHT;
|
||||||
|
#endif
|
||||||
|
if (_active) dsp.fillRect(_oldleft == 0 ? _realLeft() : min(_oldleft, _realLeft()), _config.top-_textheight+1, max(_oldtextwidth, _textwidth), realth, _bgcolor);
|
||||||
_oldtextwidth = _textwidth;
|
_oldtextwidth = _textwidth;
|
||||||
_oldleft = _realLeft();
|
_oldleft = _realLeft();
|
||||||
if (_active) _draw();
|
if (_active) _draw();
|
||||||
|
|||||||
Reference in New Issue
Block a user