mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Fix compilation with disabled webserver
This commit is contained in:
parent
587af1c69e
commit
4c86470595
@ -591,6 +591,7 @@ void Cmd_MicRec(void) {
|
||||
}
|
||||
#endif // USE_M5STACK_CORE2
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
const char HTTP_WEBRADIO[] PROGMEM =
|
||||
"{s}" "I2S_WR-Title" "{m}%s{e}";
|
||||
|
||||
@ -599,6 +600,7 @@ void I2S_WR_Show(void) {
|
||||
WSContentSend_PD(HTTP_WEBRADIO,wr_title);
|
||||
}
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
|
||||
#endif // USE_I2S_WEBRADIO
|
||||
|
||||
|
@ -649,9 +649,10 @@ bool CCLChipFound() {
|
||||
return CCL.chip.ID!=0;
|
||||
}
|
||||
/*********************************************************************************************\
|
||||
* oresentation
|
||||
* presentation
|
||||
\*********************************************************************************************/
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
void CCLoadershow(bool json) {
|
||||
if (json) {
|
||||
// unused
|
||||
@ -664,6 +665,7 @@ void CCLoadershow(bool json) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Interface
|
||||
@ -682,9 +684,11 @@ bool Xdrv46(uint8_t function) {
|
||||
case FUNC_EVERY_100_MSECOND:
|
||||
CCLoaderLoop();
|
||||
break;
|
||||
#ifdef USE_WEBSERVER
|
||||
case FUNC_WEB_SENSOR:
|
||||
CCLoadershow(0);
|
||||
break;
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1902,6 +1902,7 @@ char* SSPMEnergyFormat(char* result, float* input, uint32_t resolution, uint8_t*
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
const char HTTP_SSPM_VOLTAGE[] PROGMEM =
|
||||
"{s}" D_VOLTAGE "</th>%s" D_UNIT_VOLT "{e}"; // {s} = <tr><th>, {m} = </th><td style='width:20px;white-space:nowrap'>, {e} = </td></tr>
|
||||
const char HTTP_SSPM_CURRENT[] PROGMEM =
|
||||
@ -1916,6 +1917,7 @@ const char HTTP_SSPM_ENERGY[] PROGMEM =
|
||||
"{s}" D_ENERGY_TODAY "</th>%s" D_UNIT_KILOWATTHOUR "{e}"
|
||||
"{s}" D_ENERGY_YESTERDAY "</th>%s" D_UNIT_KILOWATTHOUR "{e}"
|
||||
"{s}" D_ENERGY_TOTAL "</th>%s" D_UNIT_KILOWATTHOUR "{e}";
|
||||
#endif // USE_WEBSERVER
|
||||
|
||||
void SSPMEnergyShow(bool json) {
|
||||
if (!TasmotaGlobal.devices_present) { return; } // Not ready yet
|
||||
@ -1962,6 +1964,7 @@ void SSPMEnergyShow(bool json) {
|
||||
ResponseAppend_P(PSTR("%s%*_f"), (i>0)?",":"", Settings->flag2.current_resolution, &Sspm->current[i >>2][i &3]);
|
||||
}
|
||||
ResponseAppend_P(PSTR("]}"));
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
uint8_t relay[SSPM_MAX_MODULES * 4];
|
||||
uint8_t indirect[SSPM_MAX_MODULES * 4];
|
||||
@ -2008,6 +2011,7 @@ void SSPMEnergyShow(bool json) {
|
||||
SSPMEnergyFormat(valu3_chr, Sspm->energy_total[0], Settings->flag2.energy_resolution, indirect, offset, count));
|
||||
WSContentSend_P(PSTR("</table>{t}")); // {t} = <table style='width:100%'> - Define for next FUNC_WEB_SENSOR
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user