Skip to content

Commit

Permalink
Fix build when WEB_SUPPORT==0 (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Jun 11, 2018
1 parent dff81d6 commit b4a05f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 6 additions & 2 deletions code/espurna/homeassistant.ino
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,17 @@ void _haInitCommands() {
settingsRegisterCommand(F("HA.SEND"), [](Embedis* e) {
setSetting("haEnabled", "1");
_haConfigure();
wsSend(_haWebSocketOnSend);
#if WEB_SUPPORT
wsSend(_haWebSocketOnSend);
#endif
DEBUG_MSG_P(PSTR("+OK\n"));
});
settingsRegisterCommand(F("HA.CLEAR"), [](Embedis* e) {
setSetting("haEnabled", "0");
_haConfigure();
wsSend(_haWebSocketOnSend);
#if WEB_SUPPORT
wsSend(_haWebSocketOnSend);
#endif
DEBUG_MSG_P(PSTR("+OK\n"));
});
}
Expand Down
12 changes: 7 additions & 5 deletions code/espurna/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,13 @@ void _settingsInitCommands() {
DEBUG_MSG_P(PSTR("+OK\n"));
});

settingsRegisterCommand(F("RELOAD"), [](Embedis* e) {
wsReload();
DEBUG_MSG_P(PSTR("+OK\n"));
});

#if WEB_SUPPORT
settingsRegisterCommand(F("RELOAD"), [](Embedis* e) {
wsReload();
DEBUG_MSG_P(PSTR("+OK\n"));
});
#endif

settingsRegisterCommand(F("RESET"), [](Embedis* e) {
DEBUG_MSG_P(PSTR("+OK\n"));
deferredReset(100, CUSTOM_RESET_TERMINAL);
Expand Down

0 comments on commit b4a05f9

Please sign in to comment.