mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-25 22:06:58 +02:00
Attention: re-ordered display types, check your settings! #746
improved saving settings of display #747, #746 disabled contrast for Nokia display #746 added Prometheus as compile option #719, #615 update MQTT lib to v1.4.1 limit decimal places to 2 in `live` added `-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48` to esp8266 debug build #657 a `max-module-power` of `0` disables channel in live view `setup`
This commit is contained in:
parent
6ef7720324
commit
9604687157
13 changed files with 116 additions and 62 deletions
2
.github/workflows/compile_development.yml
vendored
2
.github/workflows/compile_development.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
||||||
run: python convert.py
|
run: python convert.py
|
||||||
|
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: pio run -d src --environment esp8266-release --environment esp8285-release --environment esp32-wroom32-release
|
run: pio run -d src --environment esp8266-release --environment esp8266-release-prometheus --environment esp8285-release --environment esp32-wroom32-release --environment esp32-wroom32-release-prometheus
|
||||||
|
|
||||||
- name: Rename Binary files
|
- name: Rename Binary files
|
||||||
id: rename-binary-files
|
id: rename-binary-files
|
||||||
|
|
2
.github/workflows/compile_release.yml
vendored
2
.github/workflows/compile_release.yml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
||||||
run: python convert.py
|
run: python convert.py
|
||||||
|
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: pio run -d src --environment esp8266-release --environment esp8285-release --environment esp32-wroom32-release
|
run: pio run -d src --environment esp8266-release --environment esp8266-release-prometheus --environment esp8285-release --environment esp32-wroom32-release --environment esp32-wroom32-release-prometheus
|
||||||
|
|
||||||
- name: Rename Binary files
|
- name: Rename Binary files
|
||||||
id: rename-binary-files
|
id: rename-binary-files
|
||||||
|
|
|
@ -57,6 +57,11 @@ def readVersion(path, infile):
|
||||||
dst = path + "firmware/" + versionout
|
dst = path + "firmware/" + versionout
|
||||||
os.rename(src, dst)
|
os.rename(src, dst)
|
||||||
|
|
||||||
|
versionout = version[:-1] + "_" + sha + "_esp8266_prometheus.bin"
|
||||||
|
src = path + ".pio/build/esp8266-release-prometheus/firmware.bin"
|
||||||
|
dst = path + "firmware/" + versionout
|
||||||
|
os.rename(src, dst)
|
||||||
|
|
||||||
versionout = version[:-1] + "_" + sha + "_esp8285.bin"
|
versionout = version[:-1] + "_" + sha + "_esp8285.bin"
|
||||||
src = path + ".pio/build/esp8285-release/firmware.bin"
|
src = path + ".pio/build/esp8285-release/firmware.bin"
|
||||||
dst = path + "firmware/" + versionout
|
dst = path + "firmware/" + versionout
|
||||||
|
@ -68,6 +73,11 @@ def readVersion(path, infile):
|
||||||
dst = path + "firmware/" + versionout
|
dst = path + "firmware/" + versionout
|
||||||
os.rename(src, dst)
|
os.rename(src, dst)
|
||||||
|
|
||||||
|
versionout = version[:-1] + "_" + sha + "_esp32_prometheus.bin"
|
||||||
|
src = path + ".pio/build/esp32-wroom32-release-prometheus/firmware.bin"
|
||||||
|
dst = path + "firmware/" + versionout
|
||||||
|
os.rename(src, dst)
|
||||||
|
|
||||||
# other ESP32 bin files
|
# other ESP32 bin files
|
||||||
src = path + ".pio/build/esp32-wroom32-release/"
|
src = path + ".pio/build/esp32-wroom32-release/"
|
||||||
dst = path + "firmware/"
|
dst = path + "firmware/"
|
||||||
|
|
|
@ -2,6 +2,16 @@
|
||||||
|
|
||||||
(starting from release version `0.5.66`)
|
(starting from release version `0.5.66`)
|
||||||
|
|
||||||
|
## 0.5.97
|
||||||
|
* Attention: re-ordered display types, check your settings! #746
|
||||||
|
* improved saving settings of display #747, #746
|
||||||
|
* disabled contrast for Nokia display #746
|
||||||
|
* added Prometheus as compile option #719, #615
|
||||||
|
* update MQTT lib to v1.4.1
|
||||||
|
* limit decimal places to 2 in `live`
|
||||||
|
* added `-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48` to esp8266 debug build #657
|
||||||
|
* a `max-module-power` of `0` disables channel in live view `setup`
|
||||||
|
|
||||||
## 0.5.96
|
## 0.5.96
|
||||||
* added Nokia display again for ESP8266 #764
|
* added Nokia display again for ESP8266 #764
|
||||||
* changed `var` / `VAr` to SI unit `var` #732
|
* changed `var` / `VAr` to SI unit `var` #732
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 5
|
#define VERSION_MINOR 5
|
||||||
#define VERSION_PATCH 96
|
#define VERSION_PATCH 97
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -37,7 +37,7 @@ lib_deps =
|
||||||
https://github.com/yubox-node-org/ESPAsyncWebServer
|
https://github.com/yubox-node-org/ESPAsyncWebServer
|
||||||
nrf24/RF24
|
nrf24/RF24
|
||||||
paulstoffregen/Time
|
paulstoffregen/Time
|
||||||
https://github.com/bertmelis/espMqttClient#v1.3.3
|
https://github.com/bertmelis/espMqttClient#v1.4.1
|
||||||
bblanchon/ArduinoJson
|
bblanchon/ArduinoJson
|
||||||
https://github.com/JChristensen/Timezone
|
https://github.com/JChristensen/Timezone
|
||||||
olikraus/U8g2
|
olikraus/U8g2
|
||||||
|
@ -60,11 +60,23 @@ monitor_filters =
|
||||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
esp8266_exception_decoder
|
esp8266_exception_decoder
|
||||||
|
|
||||||
|
|
||||||
|
[env:esp8266-release-prometheus]
|
||||||
|
platform = espressif8266
|
||||||
|
board = esp12e
|
||||||
|
board_build.f_cpu = 80000000L
|
||||||
|
build_flags = -D RELEASE -DENABLE_PROMETHEUS_EP
|
||||||
|
monitor_filters =
|
||||||
|
;default ; Remove typical terminal control codes from input
|
||||||
|
;time ; Add timestamp with milliseconds for each new line
|
||||||
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
|
esp8266_exception_decoder
|
||||||
|
|
||||||
[env:esp8266-debug]
|
[env:esp8266-debug]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = esp12e
|
board = esp12e
|
||||||
board_build.f_cpu = 80000000L
|
board_build.f_cpu = 80000000L
|
||||||
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial
|
build_flags = -DDEBUG_LEVEL=DBG_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_OOM -DDEBUG_ESP_PORT=Serial -DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48
|
||||||
build_type = debug
|
build_type = debug
|
||||||
monitor_filters =
|
monitor_filters =
|
||||||
;default ; Remove typical terminal control codes from input
|
;default ; Remove typical terminal control codes from input
|
||||||
|
@ -105,6 +117,17 @@ monitor_filters =
|
||||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
esp32_exception_decoder
|
esp32_exception_decoder
|
||||||
|
|
||||||
|
[env:esp32-wroom32-release-prometheus]
|
||||||
|
platform = espressif32
|
||||||
|
board = lolin_d32
|
||||||
|
build_flags = -D RELEASE -std=gnu++14 -DENABLE_PROMETHEUS_EP
|
||||||
|
build_unflags = -std=gnu++11
|
||||||
|
monitor_filters =
|
||||||
|
;default ; Remove typical terminal control codes from input
|
||||||
|
;time ; Add timestamp with milliseconds for each new line
|
||||||
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
|
esp32_exception_decoder
|
||||||
|
|
||||||
[env:esp32-wroom32-debug]
|
[env:esp32-wroom32-debug]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
|
|
|
@ -22,6 +22,7 @@ DisplayMono::DisplayMono() {
|
||||||
_dispY = 0;
|
_dispY = 0;
|
||||||
mTimeout = DISP_DEFAULT_TIMEOUT; // interval at which to power save (milliseconds)
|
mTimeout = DISP_DEFAULT_TIMEOUT; // interval at which to power save (milliseconds)
|
||||||
mUtcTs = NULL;
|
mUtcTs = NULL;
|
||||||
|
mType = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,17 +30,18 @@ DisplayMono::DisplayMono() {
|
||||||
void DisplayMono::init(uint8_t type, uint8_t rot, uint8_t cs, uint8_t dc, uint8_t reset, uint8_t clock, uint8_t data, uint32_t *utcTs, const char* version) {
|
void DisplayMono::init(uint8_t type, uint8_t rot, uint8_t cs, uint8_t dc, uint8_t reset, uint8_t clock, uint8_t data, uint32_t *utcTs, const char* version) {
|
||||||
if ((0 < type) && (type < 4)) {
|
if ((0 < type) && (type < 4)) {
|
||||||
u8g2_cb_t *rot = (u8g2_cb_t *)((rot != 0x00) ? U8G2_R2 : U8G2_R0);
|
u8g2_cb_t *rot = (u8g2_cb_t *)((rot != 0x00) ? U8G2_R2 : U8G2_R0);
|
||||||
|
mType = type;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 1:
|
case 1:
|
||||||
mDisplay = new U8G2_PCD8544_84X48_F_4W_SW_SPI(rot, clock, data, cs, dc, reset);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
mDisplay = new U8G2_SSD1306_128X64_NONAME_F_HW_I2C(rot, reset, clock, data);
|
mDisplay = new U8G2_SSD1306_128X64_NONAME_F_HW_I2C(rot, reset, clock, data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case 3:
|
case 2:
|
||||||
mDisplay = new U8G2_SH1106_128X64_NONAME_F_HW_I2C(rot, reset, clock, data);
|
mDisplay = new U8G2_SH1106_128X64_NONAME_F_HW_I2C(rot, reset, clock, data);
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
mDisplay = new U8G2_PCD8544_84X48_F_4W_SW_SPI(rot, clock, data, cs, dc, reset);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mUtcTs = utcTs;
|
mUtcTs = utcTs;
|
||||||
|
@ -50,6 +52,7 @@ void DisplayMono::init(uint8_t type, uint8_t rot, uint8_t cs, uint8_t dc, uint8_
|
||||||
calcLineHeights();
|
calcLineHeights();
|
||||||
|
|
||||||
mDisplay->clearBuffer();
|
mDisplay->clearBuffer();
|
||||||
|
if (3 != mType)
|
||||||
mDisplay->setContrast(mLuminance);
|
mDisplay->setContrast(mLuminance);
|
||||||
printText("AHOY!", 0, 35);
|
printText("AHOY!", 0, 35);
|
||||||
printText("ahoydtu.de", 2, 20);
|
printText("ahoydtu.de", 2, 20);
|
||||||
|
@ -76,6 +79,7 @@ void DisplayMono::disp(float totalPower, float totalYieldDay, float totalYieldTo
|
||||||
mDisplay->clearBuffer();
|
mDisplay->clearBuffer();
|
||||||
|
|
||||||
// set Contrast of the Display to raise the lifetime
|
// set Contrast of the Display to raise the lifetime
|
||||||
|
if (3 != mType)
|
||||||
mDisplay->setContrast(mLuminance);
|
mDisplay->setContrast(mLuminance);
|
||||||
|
|
||||||
if ((totalPower > 0) && (isprod > 0)) {
|
if ((totalPower > 0) && (isprod > 0)) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ class DisplayMono {
|
||||||
|
|
||||||
U8G2* mDisplay;
|
U8G2* mDisplay;
|
||||||
|
|
||||||
|
uint8_t mType;
|
||||||
bool mEnPowerSafe, mEnScreenSaver;
|
bool mEnPowerSafe, mEnScreenSaver;
|
||||||
uint8_t mLuminance;
|
uint8_t mLuminance;
|
||||||
|
|
||||||
|
|
|
@ -305,8 +305,8 @@ class RestApi {
|
||||||
|
|
||||||
for(uint8_t j = 0; j < iv->channels; j ++) {
|
for(uint8_t j = 0; j < iv->channels; j ++) {
|
||||||
obj2[F("ch_yield_cor")][j] = iv->config->yieldCor[j];
|
obj2[F("ch_yield_cor")][j] = iv->config->yieldCor[j];
|
||||||
obj2[F("ch_max_power")][j] = iv->config->chMaxPwr[j];
|
|
||||||
obj2[F("ch_name")][j] = iv->config->chName[j];
|
obj2[F("ch_name")][j] = iv->config->chName[j];
|
||||||
|
obj2[F("ch_max_pwr")][j] = iv->config->chMaxPwr[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,6 +344,7 @@ class RestApi {
|
||||||
// DC
|
// DC
|
||||||
for(uint8_t j = 0; j < iv->channels; j ++) {
|
for(uint8_t j = 0; j < iv->channels; j ++) {
|
||||||
obj[F("ch_name")][j+1] = iv->config->chName[j];
|
obj[F("ch_name")][j+1] = iv->config->chName[j];
|
||||||
|
obj[F("ch_max_pwr")][j+1] = iv->config->chMaxPwr[j];
|
||||||
JsonArray cur = ch.createNestedArray();
|
JsonArray cur = ch.createNestedArray();
|
||||||
for (uint8_t fld = 0; fld < sizeof(dcList); fld++) {
|
for (uint8_t fld = 0; fld < sizeof(dcList); fld++) {
|
||||||
pos = (iv->getPosByChFld((j+1), dcList[fld], rec));
|
pos = (iv->getPosByChFld((j+1), dcList[fld], rec));
|
||||||
|
@ -410,12 +411,12 @@ class RestApi {
|
||||||
obj[F("disp_pxshift")] = (bool)mConfig->plugin.display.pxShift;
|
obj[F("disp_pxshift")] = (bool)mConfig->plugin.display.pxShift;
|
||||||
obj[F("disp_rot")] = (uint8_t)mConfig->plugin.display.rot;
|
obj[F("disp_rot")] = (uint8_t)mConfig->plugin.display.rot;
|
||||||
obj[F("disp_cont")] = (uint8_t)mConfig->plugin.display.contrast;
|
obj[F("disp_cont")] = (uint8_t)mConfig->plugin.display.contrast;
|
||||||
obj[F("disp_clk")] = mConfig->plugin.display.disp_clk;
|
obj[F("disp_clk")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_clk;
|
||||||
obj[F("disp_data")] = mConfig->plugin.display.disp_data;
|
obj[F("disp_data")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_data;
|
||||||
obj[F("disp_cs")] = mConfig->plugin.display.disp_cs;
|
obj[F("disp_cs")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_cs;
|
||||||
obj[F("disp_dc")] = mConfig->plugin.display.disp_dc;
|
obj[F("disp_dc")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_dc;
|
||||||
obj[F("disp_rst")] = mConfig->plugin.display.disp_reset;
|
obj[F("disp_rst")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_reset;
|
||||||
obj[F("disp_bsy")] = mConfig->plugin.display.disp_busy;
|
obj[F("disp_bsy")] = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : mConfig->plugin.display.disp_busy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getIndex(JsonObject obj) {
|
void getIndex(JsonObject obj) {
|
||||||
|
|
|
@ -136,6 +136,10 @@
|
||||||
<div class="col-12 col-sm-3"></div>
|
<div class="col-12 col-sm-3"></div>
|
||||||
<div class="col-12 col-sm-9"><input type="button" id="btnAdd" class="btn" value="Add Inverter"/></div>
|
<div class="col-12 col-sm-9"><input type="button" id="btnAdd" class="btn" value="Add Inverter"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-12 col-sm-3"><p class="subdes">Note</p></div>
|
||||||
|
<div class="col-12 col-sm-9"><p>A 'max module power' value of '0' disables the channel in 'live' view</p></div>
|
||||||
|
</div>
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-12 col-sm-3"><p class="subdes">General</p></div>
|
<div class="col-12 col-sm-3"><p class="subdes">General</p></div>
|
||||||
<div class="col-12 col-sm-9"></div>
|
<div class="col-12 col-sm-9"></div>
|
||||||
|
@ -499,7 +503,7 @@
|
||||||
iv.append(mlE("Name*", inp(id + "Name", obj["name"], 16, ["text"], null, "text", "[A-Za-z0-9./#$%&=+_-]+", "Invalid input")));
|
iv.append(mlE("Name*", inp(id + "Name", obj["name"], 16, ["text"], null, "text", "[A-Za-z0-9./#$%&=+_-]+", "Invalid input")));
|
||||||
|
|
||||||
for(var j of [
|
for(var j of [
|
||||||
["ModPwr", "ch_max_power", "Max Module Power (Wp)", 4, "[0-9]+"],
|
["ModPwr", "ch_max_pwr", "Max Module Power (Wp)", 4, "[0-9]+"],
|
||||||
["ModName", "ch_name", "Module Name", 15, null],
|
["ModName", "ch_name", "Module Name", 15, null],
|
||||||
["YieldCor", "ch_yield_cor", "Yield Total Correction [kWh]", 8, "[0-9-]+"]]) {
|
["YieldCor", "ch_yield_cor", "Yield Total Correction [kWh]", 8, "[0-9-]+"]]) {
|
||||||
|
|
||||||
|
@ -648,7 +652,7 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var opts = [[0, "None"], [1, "Nokia5110"], [2, "SSD1306 0.96\""], [3, "SH1106 1.3\""]];
|
var opts = [[0, "None"], [1, "SSD1306 0.96\""], [2, "SH1106 1.3\""], [3, "Nokia5110"]];
|
||||||
if("ESP32" == type)
|
if("ESP32" == type)
|
||||||
opts.push([10, "ePaper"]);
|
opts.push([10, "ePaper"]);
|
||||||
document.getElementById("dispType").append(
|
document.getElementById("dispType").append(
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
return ml("div", {class: "col-6 col-sm-4 a-c"}, [
|
return ml("div", {class: "col-6 col-sm-4 a-c"}, [
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
ml("div", {class: "col"}, [
|
ml("div", {class: "col"}, [
|
||||||
ml("span", {class: "fs-5 fs-md-4"}, String(val)),
|
ml("span", {class: "fs-5 fs-md-4"}, String(Math.round(val * 100) / 100)),
|
||||||
ml("span", {class: "fs-6 fs-md-7 mx-1"}, unit)
|
ml("span", {class: "fs-6 fs-md-7 mx-1"}, unit)
|
||||||
])),
|
])),
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
return ml("div", {class: "col-6 col-sm-4 col-md-3 mb-2"}, [
|
return ml("div", {class: "col-6 col-sm-4 col-md-3 mb-2"}, [
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
ml("div", {class: "col"}, [
|
ml("div", {class: "col"}, [
|
||||||
ml("span", {class: "fs-6"}, String(val)),
|
ml("span", {class: "fs-6"}, String(Math.round(val * 100) / 100)),
|
||||||
ml("span", {class: "fs-8 mx-1"}, unit)
|
ml("span", {class: "fs-8 mx-1"}, unit)
|
||||||
])),
|
])),
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
total[3] += obj.ch[0][8]; // P_DC
|
total[3] += obj.ch[0][8]; // P_DC
|
||||||
total[4] += obj.ch[0][10]; // Q_AC
|
total[4] += obj.ch[0][10]; // Q_AC
|
||||||
var t = span(" ° C");
|
var t = span(" ° C");
|
||||||
return ml("div", {class: "row"},
|
return ml("div", {class: "row mt-2"},
|
||||||
ml("div", {class: "col"}, [
|
ml("div", {class: "col"}, [
|
||||||
ml("div", {class: "p-2 iv-h"},
|
ml("div", {class: "p-2 iv-h"},
|
||||||
ml("div", {class: "row"}, [
|
ml("div", {class: "row"}, [
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
return ml("div", {class: "col-12 col-sm-6 col-md-12 mb-2"}, [
|
return ml("div", {class: "col-12 col-sm-6 col-md-12 mb-2"}, [
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
ml("div", {class: "col"}, [
|
ml("div", {class: "col"}, [
|
||||||
ml("span", {class: "fs-6 fs-md-7"}, String(val)),
|
ml("span", {class: "fs-6 fs-md-7"}, String(Math.round(val * 100) / 100)),
|
||||||
ml("span", {class: "fs-8 mx-2"}, unit)
|
ml("span", {class: "fs-8 mx-2"}, unit)
|
||||||
])),
|
])),
|
||||||
ml("div", {class: "row"},
|
ml("div", {class: "row"},
|
||||||
|
@ -182,6 +182,7 @@
|
||||||
var name = obj.ch_name[i];
|
var name = obj.ch_name[i];
|
||||||
if(name.length == 0)
|
if(name.length == 0)
|
||||||
name = "CHANNEL " + i;
|
name = "CHANNEL " + i;
|
||||||
|
if(obj.ch_max_pwr[i] > 0) // show channel only if max mod pwr
|
||||||
chn.push(ch(name, obj.ch[i]));
|
chn.push(ch(name, obj.ch[i]));
|
||||||
}
|
}
|
||||||
mIvHtml.push(
|
mIvHtml.push(
|
||||||
|
|
|
@ -582,13 +582,13 @@ class Web {
|
||||||
mConfig->plugin.display.pxShift = (request->arg("disp_pxshift") == "on");
|
mConfig->plugin.display.pxShift = (request->arg("disp_pxshift") == "on");
|
||||||
mConfig->plugin.display.rot = request->arg("disp_rot").toInt();
|
mConfig->plugin.display.rot = request->arg("disp_rot").toInt();
|
||||||
mConfig->plugin.display.type = request->arg("disp_typ").toInt();
|
mConfig->plugin.display.type = request->arg("disp_typ").toInt();
|
||||||
mConfig->plugin.display.contrast = request->arg("disp_cont").toInt();
|
mConfig->plugin.display.contrast = (mConfig->plugin.display.type == 0) ? 60 : request->arg("disp_cont").toInt();
|
||||||
mConfig->plugin.display.disp_data = request->arg("disp_data").toInt();
|
mConfig->plugin.display.disp_data = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : request->arg("disp_data").toInt();
|
||||||
mConfig->plugin.display.disp_clk = request->arg("disp_clk").toInt();
|
mConfig->plugin.display.disp_clk = (mConfig->plugin.display.type == 0) ? DEF_PIN_OFF : request->arg("disp_clk").toInt();
|
||||||
mConfig->plugin.display.disp_cs = request->arg("disp_cs").toInt();
|
mConfig->plugin.display.disp_cs = (mConfig->plugin.display.type < 3) ? DEF_PIN_OFF : request->arg("disp_cs").toInt();
|
||||||
mConfig->plugin.display.disp_reset = request->arg("disp_rst").toInt();
|
mConfig->plugin.display.disp_reset = (mConfig->plugin.display.type < 3) ? DEF_PIN_OFF : request->arg("disp_rst").toInt();
|
||||||
mConfig->plugin.display.disp_busy = request->arg("disp_bsy").toInt();
|
mConfig->plugin.display.disp_dc = (mConfig->plugin.display.type < 3) ? DEF_PIN_OFF : request->arg("disp_dc").toInt();
|
||||||
mConfig->plugin.display.disp_dc = request->arg("disp_dc").toInt();
|
mConfig->plugin.display.disp_busy = (mConfig->plugin.display.type < 10) ? DEF_PIN_OFF : request->arg("disp_bsy").toInt();
|
||||||
|
|
||||||
mApp->saveSettings();
|
mApp->saveSettings();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue