Browse Source

Fix conflicts:

1. Add thermostat to the espurna_modules in progmem.h
2. Add thermostat to webui, gulp, html, js.
3. in general.h MQTT_USE_JSON returned to 0 by default and 1 if thermostat enabled.
rules-rpn
Dmitry Blinov 5 years ago
parent
commit
ec39ac5c88
21 changed files with 19773 additions and 17052 deletions
  1. +8
    -2
      code/espurna/config/general.h
  2. +6
    -0
      code/espurna/config/progmem.h
  3. +13
    -0
      code/espurna/config/webui.h
  4. BIN
      code/espurna/data/index.all.html.gz
  5. BIN
      code/espurna/data/index.light.html.gz
  6. BIN
      code/espurna/data/index.rfbridge.html.gz
  7. BIN
      code/espurna/data/index.rfm69.html.gz
  8. BIN
      code/espurna/data/index.sensor.html.gz
  9. BIN
      code/espurna/data/index.small.html.gz
  10. BIN
      code/espurna/data/index.thermostat.html.gz
  11. +3193
    -3154
      code/espurna/static/index.all.html.gz.h
  12. +3009
    -3002
      code/espurna/static/index.light.html.gz.h
  13. +2304
    -2297
      code/espurna/static/index.rfbridge.html.gz.h
  14. +3669
    -3661
      code/espurna/static/index.rfm69.html.gz.h
  15. +2677
    -2670
      code/espurna/static/index.sensor.html.gz.h
  16. +2272
    -2265
      code/espurna/static/index.small.html.gz.h
  17. +2604
    -0
      code/espurna/static/index.thermostat.html.gz.h
  18. +2
    -0
      code/espurna/web.ino
  19. +7
    -1
      code/gulpfile.js
  20. +5
    -0
      code/html/custom.js
  21. +4
    -0
      code/html/index.html

+ 8
- 2
code/espurna/config/general.h View File

@ -779,8 +779,14 @@
#endif
#ifndef MQTT_USE_JSON
#define MQTT_USE_JSON 1 // Group messages in a JSON body
#if THERMOSTAT_SUPPORT == 1
#ifndef MQTT_USE_JSON
#define MQTT_USE_JSON 1 // Group messages in a JSON body
#endif
#else
#ifndef MQTT_USE_JSON
#define MQTT_USE_JSON 0 // Don't group messages in a JSON body (default)
#endif
#endif
#ifndef MQTT_USE_JSON_DELAY


+ 6
- 0
code/espurna/config/progmem.h View File

@ -118,6 +118,12 @@ PROGMEM const char espurna_modules[] =
#if TERMINAL_SUPPORT
"TERMINAL "
#endif
#if THERMOSTAT_SUPPORT
"THERMOSTAT "
#endif
#if THERMOSTAT_DISPLAY_SUPPORT
"THERMOSTAT_DISPLAY "
#endif
#if THINGSPEAK_SUPPORT
"THINGSPEAK "
#endif


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

@ -7,6 +7,7 @@
#define WEBUI_IMAGE_SENSOR 2
#define WEBUI_IMAGE_RFBRIDGE 4
#define WEBUI_IMAGE_RFM69 8
#define WEBUI_IMAGE_THERMOSTAT 9
#define WEBUI_IMAGE_FULL 15
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
@ -45,6 +46,15 @@
#endif
#endif
#if THERMOSTAT_SUPPORT == 1
#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_THERMOSTAT
#else
#undef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_FULL
#endif
#endif
#ifndef WEBUI_IMAGE
#define WEBUI_IMAGE WEBUI_IMAGE_SMALL
#endif
@ -67,6 +77,9 @@ PROGMEM const char espurna_webui[] =
#if WEBUI_IMAGE == WEBUI_IMAGE_RFM69
"RFM69"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_THERMOSTAT
"THERMOSTAT"
#endif
#if WEBUI_IMAGE == WEBUI_IMAGE_FULL
"FULL"
#endif


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 2
- 0
code/espurna/web.ino View File

@ -27,6 +27,8 @@ Copyright (C) 2016-2019 by Xose Pérez <xose dot perez at gmail dot com>
#include "static/index.rfbridge.html.gz.h"
#elif WEBUI_IMAGE == WEBUI_IMAGE_RFM69
#include "static/index.rfm69.html.gz.h"
#elif WEBUI_IMAGE == WEBUI_IMAGE_THERMOSTAT
#include "static/index.thermostat.html.gz.h"
#elif WEBUI_IMAGE == WEBUI_IMAGE_FULL
#include "static/index.all.html.gz.h"
#endif


+ 7
- 1
code/gulpfile.js View File

@ -109,12 +109,13 @@ var htmllintReporter = function(filepath, issues) {
var buildWebUI = function(module) {
var modules = {'light': false, 'sensor': false, 'rfbridge': false, 'rfm69': false};
var modules = {'light': false, 'sensor': false, 'rfbridge': false, 'rfm69': false, 'thermostat': false};
if ('all' === module) {
modules['light'] = true;
modules['sensor'] = true;
modules['rfbridge'] = true;
modules['rfm69'] = false; // we will never be adding this except when building RFM69GW
modules['thermostat'] = true;
} else if ('small' !== module) {
modules[module] = true;
}
@ -186,6 +187,10 @@ gulp.task('webui_rfm69', function() {
return buildWebUI('rfm69');
});
gulp.task('webui_thermostat', function() {
return buildWebUI('thermostat');
});
gulp.task('webui_all', function() {
return buildWebUI('all');
});
@ -197,6 +202,7 @@ gulp.task('webui',
'webui_light',
'webui_rfbridge',
'webui_rfm69',
'webui_thermostat',
'webui_all'
)
);


+ 5
- 0
code/html/custom.js View File

@ -380,12 +380,14 @@ function checkTempRangeMax() {
}
}
<!-- removeIf(!thermostat)-->
function doResetThermostatCounters(ask) {
var question = (typeof ask === "undefined" || false === ask) ?
null :
"Are you sure you want to reset burning counters?";
return doAction(question, "thermostat_reset_counters");
}
<!-- endRemoveIf(!thermostat)-->
// -----------------------------------------------------------------------------
// Actions
@ -1735,7 +1737,10 @@ $(function() {
$(".button-settings-factory").on("click", doFactoryReset);
$("#uploader").on("change", onFileUpload);
$(".button-upgrade").on("click", doUpgrade);
<!-- removeIf(!thermostat)-->
$(".button-thermostat-reset-counters").on('click', doResetThermostatCounters);
<!-- endRemoveIf(!thermostat)-->
$(".button-apikey").on("click", generateAPIKey);
$(".button-upgrade-browse").on("click", function() {


+ 4
- 0
code/html/index.html View File

@ -96,9 +96,11 @@
<a href="#" class="pure-menu-link" data="panel-general">GENERAL</a>
</li>
<!-- removeIf(!thermostat) -->
<li class="pure-menu-item module module-thermostat">
<a href="#" class="pure-menu-link" data="panel-thermostat">THERMOSTAT</a>
</li>
<!-- endRemoveIf(!thermostat) -->
<li class="pure-menu-item module module-dcz">
<a href="#" class="pure-menu-link" data="panel-domoticz">DOMOTICZ</a>
@ -1028,6 +1030,7 @@
</div>
</form>
<!-- removeIf(!thermostat) -->
<form id="form-thermostat" class="pure-form form-settings">
<div class="panel" id="panel-thermostat">
@ -1149,6 +1152,7 @@
</div>
</div>
</form>
<!-- endRemoveIf(!thermostat) -->
<form id="form-domoticz" class="pure-form form-settings">
<div class="panel" id="panel-domoticz">


Loading…
Cancel
Save