mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-19 16:56:34 +00:00
Fix compile error if no USE_LIGHT
This commit is contained in:
parent
49febe4a54
commit
c066b0c8e2
@ -230,7 +230,9 @@ void MhzEverySecond(void)
|
|||||||
mhz_type = (s) ? 1 : 2;
|
mhz_type = (s) ? 1 : 2;
|
||||||
if (MhzCheckAndApplyFilter(ppm, s)) {
|
if (MhzCheckAndApplyFilter(ppm, s)) {
|
||||||
mhz_retry = MHZ19_RETRY_COUNT;
|
mhz_retry = MHZ19_RETRY_COUNT;
|
||||||
|
#ifdef USE_LIGHT
|
||||||
LightSetSignal(CO2_LOW, CO2_HIGH, mhz_last_ppm);
|
LightSetSignal(CO2_LOW, CO2_HIGH, mhz_last_ppm);
|
||||||
|
#endif // USE_LIGHT
|
||||||
|
|
||||||
if (0 == s || 64 == s) { // Reading is stable.
|
if (0 == s || 64 == s) { // Reading is stable.
|
||||||
if (mhz_abc_must_apply) {
|
if (mhz_abc_must_apply) {
|
||||||
|
@ -84,7 +84,9 @@ void Senseair250ms(void) // Every 250 mSec
|
|||||||
break;
|
break;
|
||||||
case 2: // 0x03 (3) READ_CO2 - fe 04 02 06 2c af 59
|
case 2: // 0x03 (3) READ_CO2 - fe 04 02 06 2c af 59
|
||||||
senseair_co2 = value;
|
senseair_co2 = value;
|
||||||
|
#ifdef USE_LIGHT
|
||||||
LightSetSignal(CO2_LOW, CO2_HIGH, senseair_co2);
|
LightSetSignal(CO2_LOW, CO2_HIGH, senseair_co2);
|
||||||
|
#endif // USE_LIGHT
|
||||||
break;
|
break;
|
||||||
case 3: // 0x04 (4) READ_TEMPERATURE - S8: fe 84 02 f2 f1 - Illegal Data Address
|
case 3: // 0x04 (4) READ_TEMPERATURE - S8: fe 84 02 f2 f1 - Illegal Data Address
|
||||||
senseair_temperature = ConvertTemp((float)value / 100);
|
senseair_temperature = ConvertTemp((float)value / 100);
|
||||||
|
@ -215,7 +215,9 @@ void AzEverySecond(void)
|
|||||||
}
|
}
|
||||||
response_substr[j] = 0; // add null terminator
|
response_substr[j] = 0; // add null terminator
|
||||||
az_co2 = atoi((char*)response_substr);
|
az_co2 = atoi((char*)response_substr);
|
||||||
|
#ifdef USE_LIGHT
|
||||||
LightSetSignal(CO2_LOW, CO2_HIGH, az_co2);
|
LightSetSignal(CO2_LOW, CO2_HIGH, az_co2);
|
||||||
|
#endif // USE_LIGHT
|
||||||
i += 3; // advance to second delimiter
|
i += 3; // advance to second delimiter
|
||||||
if(az_response[i] != ':') {
|
if(az_response[i] != ':') {
|
||||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "AZ7798 error second delimiter"));
|
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "AZ7798 error second delimiter"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user