Fix compile error if no USE_LIGHT

This commit is contained in:
Theo Arends 2020-04-03 18:34:02 +02:00
parent 49febe4a54
commit c066b0c8e2
3 changed files with 6 additions and 0 deletions

View File

@ -230,7 +230,9 @@ void MhzEverySecond(void)
mhz_type = (s) ? 1 : 2;
if (MhzCheckAndApplyFilter(ppm, s)) {
mhz_retry = MHZ19_RETRY_COUNT;
#ifdef USE_LIGHT
LightSetSignal(CO2_LOW, CO2_HIGH, mhz_last_ppm);
#endif // USE_LIGHT
if (0 == s || 64 == s) { // Reading is stable.
if (mhz_abc_must_apply) {

View File

@ -84,7 +84,9 @@ void Senseair250ms(void) // Every 250 mSec
break;
case 2: // 0x03 (3) READ_CO2 - fe 04 02 06 2c af 59
senseair_co2 = value;
#ifdef USE_LIGHT
LightSetSignal(CO2_LOW, CO2_HIGH, senseair_co2);
#endif // USE_LIGHT
break;
case 3: // 0x04 (4) READ_TEMPERATURE - S8: fe 84 02 f2 f1 - Illegal Data Address
senseair_temperature = ConvertTemp((float)value / 100);

View File

@ -215,7 +215,9 @@ void AzEverySecond(void)
}
response_substr[j] = 0; // add null terminator
az_co2 = atoi((char*)response_substr);
#ifdef USE_LIGHT
LightSetSignal(CO2_LOW, CO2_HIGH, az_co2);
#endif // USE_LIGHT
i += 3; // advance to second delimiter
if(az_response[i] != ':') {
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "AZ7798 error second delimiter"));