|
|
|
@ -157,7 +157,7 @@ static void new_data_callback( |
|
|
|
|
case BSEC_OUTPUT_IAQ: |
|
|
|
|
ESP_LOGI(TAG, "\tIAQ = %f, accuracy %d", output.signal, (int) output.accuracy); |
|
|
|
|
my_report.iaq = output.signal; |
|
|
|
|
my_report.iaq_ready = (3 == (int) output.accuracy); |
|
|
|
|
my_report.iaq_ready = (3 == (int) output.accuracy); // calibration finished
|
|
|
|
|
break; |
|
|
|
|
case BSEC_OUTPUT_STATIC_IAQ: |
|
|
|
|
ESP_LOGI(TAG, "\tSTATIC_IAQ = %f, accuracy %d", output.signal, (int) output.accuracy); |
|
|
|
@ -176,9 +176,19 @@ static void new_data_callback( |
|
|
|
|
my_report.pressure = output.signal; |
|
|
|
|
my_report.thpg_ready = true; |
|
|
|
|
break; |
|
|
|
|
case BSEC_OUTPUT_RAW_TEMPERATURE: |
|
|
|
|
ESP_LOGI(TAG, "\tRAW_TEMPERATURE = %f", output.signal); |
|
|
|
|
my_report.temperature_raw = output.signal; |
|
|
|
|
my_report.thpg_ready = true; |
|
|
|
|
break; |
|
|
|
|
case BSEC_OUTPUT_RAW_HUMIDITY: |
|
|
|
|
ESP_LOGI(TAG, "\tRAW_HUMIDITY = %f", output.signal); |
|
|
|
|
my_report.humidity_raw = output.signal; |
|
|
|
|
my_report.thpg_ready = true; |
|
|
|
|
break; |
|
|
|
|
case BSEC_OUTPUT_RAW_GAS: |
|
|
|
|
ESP_LOGI(TAG, "\tRAW_GAS = %f", output.signal); |
|
|
|
|
my_report.gasr = output.signal; |
|
|
|
|
my_report.gas_raw = output.signal; |
|
|
|
|
my_report.thpg_ready = true; |
|
|
|
|
break; |
|
|
|
|
case BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE: |
|
|
|
@ -207,9 +217,11 @@ static void new_data_callback( |
|
|
|
|
g_data_report.thpg_ready = true; |
|
|
|
|
g_data_report.thpg_timestamp = xTaskGetTickCount(); |
|
|
|
|
g_data_report.humidity = my_report.humidity; |
|
|
|
|
g_data_report.humidity_raw = my_report.humidity_raw; |
|
|
|
|
g_data_report.temperature = my_report.temperature; |
|
|
|
|
g_data_report.temperature_raw = my_report.temperature_raw; |
|
|
|
|
g_data_report.pressure = my_report.pressure; |
|
|
|
|
g_data_report.gasr = my_report.gasr; |
|
|
|
|
g_data_report.gas_raw = my_report.gas_raw; |
|
|
|
|
} else { |
|
|
|
|
g_data_report.thpg_ready = false; |
|
|
|
|
} |
|
|
|
@ -249,6 +261,8 @@ void voc_read_task(void *param) { |
|
|
|
|
BSEC_OUTPUT_CO2_EQUIVALENT, |
|
|
|
|
BSEC_OUTPUT_BREATH_VOC_EQUIVALENT, |
|
|
|
|
|
|
|
|
|
BSEC_OUTPUT_RAW_TEMPERATURE, |
|
|
|
|
BSEC_OUTPUT_RAW_HUMIDITY, |
|
|
|
|
BSEC_OUTPUT_RAW_PRESSURE, |
|
|
|
|
BSEC_OUTPUT_RAW_GAS, |
|
|
|
|
|
|
|
|
|