Browse Source

Show literal for webUI image in info (#1142)

ech1560
Xose Pérez 6 years ago
parent
commit
412c5a672a
8 changed files with 5282 additions and 5255 deletions
  1. +23
    -0
      code/espurna/config/webui.h
  2. BIN
      code/espurna/data/index.all.html.gz
  3. BIN
      code/espurna/data/index.sensor.html.gz
  4. +1
    -1
      code/espurna/sensor.ino
  5. +3046
    -3046
      code/espurna/static/index.all.html.gz.h
  6. +2204
    -2204
      code/espurna/static/index.sensor.html.gz.h
  7. +5
    -1
      code/espurna/utils.ino
  8. +3
    -3
      code/html/index.html

+ 23
- 0
code/espurna/config/webui.h View File

@ -48,3 +48,26 @@
#ifndef WEBUI_IMAGE #ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_SMALL #define WEBUI_IMAGE WEBUI_IMAGE_SMALL
#endif #endif
#include <pgmspace.h>
PROGMEM const char espurna_webui[] =
#if WEBUI_IMAGE == WEBUI_IMAGE_SMALL
"SMALL"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_LIGHT
"LIGHT"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_SENSOR
"SENSOR"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_RFBRIDGE
"RFBRIDGE"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_RFM69
"RFM69"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_FULL
"FULL"
#endif
"";

BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


+ 1
- 1
code/espurna/sensor.ino View File

@ -193,7 +193,7 @@ void _sensorWebSocketStart(JsonObject& root) {
} }
if (_magnitudes.size() > 0) { if (_magnitudes.size() > 0) {
root["sensorsVisible"] = 1;
root["snsVisible"] = 1;
//root["apiRealTime"] = _sensor_realtime; //root["apiRealTime"] = _sensor_realtime;
root["pwrUnits"] = _sensor_power_units; root["pwrUnits"] = _sensor_power_units;
root["energyUnits"] = _sensor_energy_units; root["energyUnits"] = _sensor_energy_units;


+ 3046
- 3046
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 2204
- 2204
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 5
- 1
code/espurna/utils.ino View File

@ -74,6 +74,10 @@ String getEspurnaSensors() {
} }
#endif #endif
String getEspurnaWebUI() {
return FPSTR(espurna_webui);
}
String buildTime() { String buildTime() {
const char time_now[] = __TIME__; // hh:mm:ss const char time_now[] = __TIME__; // hh:mm:ss
@ -320,7 +324,7 @@ void info() {
#if SENSOR_SUPPORT #if SENSOR_SUPPORT
DEBUG_MSG_P(PSTR("[INIT] SENSORS: %s\n"), getEspurnaSensors().c_str()); DEBUG_MSG_P(PSTR("[INIT] SENSORS: %s\n"), getEspurnaSensors().c_str());
#endif // SENSOR_SUPPORT #endif // SENSOR_SUPPORT
DEBUG_MSG_P(PSTR("[INIT] WEBUI IMAGE CODE: %u\n"), WEBUI_IMAGE);
DEBUG_MSG_P(PSTR("[INIT] WEBUI IMAGE: %s\n"), getEspurnaWebUI().c_str());
DEBUG_MSG_P(PSTR("\n")); DEBUG_MSG_P(PSTR("\n"));
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------


+ 3
- 3
code/html/index.html View File

@ -137,8 +137,8 @@
</li> </li>
<!-- removeIf(!sensor) --> <!-- removeIf(!sensor) -->
<li class="pure-menu-item module module-sensors">
<a href="#" class="pure-menu-link" data="panel-sensors">SENSORS</a>
<li class="pure-menu-item module module-sns">
<a href="#" class="pure-menu-link" data="panel-sns">SENSORS</a>
</li> </li>
<!-- endRemoveIf(!sensor) --> <!-- endRemoveIf(!sensor) -->
@ -1141,7 +1141,7 @@
</div> </div>
<!-- removeIf(!sensor) --> <!-- removeIf(!sensor) -->
<div class="panel" id="panel-sensors">
<div class="panel" id="panel-sns">
<div class="header"> <div class="header">
<h1>SENSOR CONFIGURATION</h1> <h1>SENSOR CONFIGURATION</h1>


Loading…
Cancel
Save