From 59b6addccfaadd35c477ef4ae0c532bf8a1e305a Mon Sep 17 00:00:00 2001 From: docBmuc <104650389+docBmuc@users.noreply.github.com> Date: Mon, 2 May 2022 19:06:10 +0200 Subject: [PATCH] Fix in live view, larger boxes in CSS, SPI-Speed define Fixed missing HM800 in liveView Larger boxes in CSS Introduced SPI speed define for reduced speed (1MHz) for increased stability --- tools/esp8266/app.cpp | 3 ++- tools/esp8266/hmRadio.h | 3 ++- tools/esp8266/html/h/style_css.h | 2 +- tools/esp8266/html/style.css | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index eaa3678a..4621abcd 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -388,7 +388,8 @@ void app::showLiveData(void) { uint8_t modNum, pos; switch(iv->type) { default: modNum = 1; break; - case INV_TYPE_HM600: modNum = 2; break; + case INV_TYPE_HM600: + case INV_TYPE_HM800: modNum = 2; break; case INV_TYPE_HM1200: modNum = 4; break; } diff --git a/tools/esp8266/hmRadio.h b/tools/esp8266/hmRadio.h index 10075ada..ff2e11b6 100644 --- a/tools/esp8266/hmRadio.h +++ b/tools/esp8266/hmRadio.h @@ -8,6 +8,7 @@ //#define CHANNEL_HOP // switch between channels or use static channel to send #define DEFAULT_RECV_CHANNEL 3 +#define SPI_SPEED 1000000 #define DTU_RADIO_ID ((uint64_t)0x1234567801ULL) #define DUMMY_RADIO_ID ((uint64_t)0xDEADBEEF01ULL) @@ -45,7 +46,7 @@ const char* const rf24AmpPower[] = {"MIN", "LOW", "HIGH", "MAX"}; template class HmRadio { public: - HmRadio() : mNrf24(CE_PIN, CS_PIN) { + HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) { mChanOut[0] = 23; mChanOut[1] = 40; mChanOut[2] = 61; diff --git a/tools/esp8266/html/h/style_css.h b/tools/esp8266/html/h/style_css.h index 128b9ca5..cf0488e4 100644 --- a/tools/esp8266/html/h/style_css.h +++ b/tools/esp8266/html/h/style_css.h @@ -1,4 +1,4 @@ #ifndef __STYLE_H__ #define __STYLE_H__ -const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}.des {margin-top:35px;font-size:14pt;color:#006ec0;}.subdes {font-size:13pt;color:#006ec0;margin-left:7px;}.fw {width:60px;display:block;float:left;}.color {width:50px;height:50px;border:1px solid #ccc;}.range {width:300px;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;}#footer p {color:#fff;padding-left:20px;padding-right:20px;font-size:10pt !important;}#footer a {color:#fff;}div.content {background-color:#fff;padding-bottom:65px;overflow:hidden;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:10px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:20px;padding-bottom:20px;}div.ch {width:250px;height:410px;background-color:#006ec0;display:inline-block;margin-right:20px;margin-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:250px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:30px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:1060px;}div.ch:last-child {margin-right:0px !important;}"; +const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}.des {margin-top:35px;font-size:14pt;color:#006ec0;}.subdes {font-size:13pt;color:#006ec0;margin-left:7px;}.fw {width:60px;display:block;float:left;}.color {width:50px;height:50px;border:1px solid #ccc;}.range {width:300px;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;float:right;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;}#footer p {color:#fff;padding-left:20px;padding-right:20px;font-size:10pt !important;}#footer a {color:#fff;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin-left:10px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:20px;padding-bottom:20px;overflow:auto;}div.ch {width:250px;height:550px;background-color:#006ec0;display:inline-block;margin-right:20px;margin-bottom:20px;overflow:auto;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:250px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:30px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:1060px;}div.ch:last-child {margin-right:0px !important;}"; #endif /*__STYLE_H__*/ diff --git a/tools/esp8266/html/style.css b/tools/esp8266/html/style.css index c92fa950..c5e36c7a 100644 --- a/tools/esp8266/html/style.css +++ b/tools/esp8266/html/style.css @@ -92,7 +92,7 @@ a.erase { div.content { background-color: #fff; padding-bottom: 65px; - overflow: hidden; + overflow: auto; } input, select { @@ -142,15 +142,17 @@ div.ch-iv { display: inline-block; margin-bottom: 20px; padding-bottom: 20px; + overflow: auto; } div.ch { width: 250px; - height: 410px; + height: 550px; background-color: #006ec0; display: inline-block; margin-right: 20px; margin-bottom: 20px; + overflow: auto; } div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head { color: #fff;