Skip to content

Commit 2e5f77d

Browse files
committed
more SCD30 info on status page
1 parent a2895b9 commit 2e5f77d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

airrohr-firmware/airrohr-firmware.ino

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,18 @@ static void webserver_status() {
16601660
page_content += FPSTR(EMPTY_ROW);
16611661
add_table_row_from_value(page_content, FPSTR(SENSORS_SDS011), last_value_SDS_version);
16621662
}
1663+
if (cfg::scd30_read) {
1664+
if (scd30.getAutoSelfCalibration() == true)
1665+
add_table_row_from_value(page_content, F("SCD30 Auto Calibration"), "enabled");
1666+
else
1667+
add_table_row_from_value(page_content, F("SCD30 Auto Calibration"), "disabled");
1668+
uint16_t settingVal;
1669+
scd30.getMeasurementInterval(&settingVal);
1670+
add_table_row_from_value(page_content, F("SCD30 measurement interval"), String(settingVal));
1671+
scd30.getTemperatureOffset(&settingVal);
1672+
add_table_row_from_value(page_content, F("SCD30 temperature offset"), String(settingVal));
1673+
}
1674+
16631675

16641676
page_content += FPSTR(EMPTY_ROW);
16651677
page_content += F("<tr><td colspan='2'><b>" INTL_ERROR "</b></td></tr>");
@@ -2956,7 +2968,7 @@ static __noinline void fetchSensorHPM(String& s) {
29562968
/*****************************************************************
29572969
* read Tera Sensor Next PM sensor sensor values *
29582970
*****************************************************************/
2959-
/* Disabled
2971+
#if NPM_READ
29602972
static void fetchSensorNPM(String& s) {
29612973

29622974
debug_outln_verbose(FPSTR(DBG_TXT_START_READING), FPSTR(SENSORS_NPM));
@@ -3245,7 +3257,7 @@ static void fetchSensorNPM(String& s) {
32453257

32463258
debug_outln_verbose(FPSTR(DBG_TXT_END_READING), FPSTR(SENSORS_NPM));
32473259
}
3248-
*/
3260+
#endif
32493261

32503262
/*****************************************************************
32513263
* read PPD42NS sensor values *
@@ -4216,6 +4228,8 @@ static void powerOnTestSensors() {
42164228
if (!scd30.begin()) {
42174229
debug_outln_error(F("Check SCD30 wiring"));
42184230
scd30_init_failed = true;
4231+
} else {
4232+
scd30.setMeasurementInterval(30);
42194233
}
42204234
}
42214235

0 commit comments

Comments
 (0)