Skip to content

Commit

Permalink
Changed measurement and update interval for Open Air. Added fw versio…
Browse files Browse the repository at this point in the history
…n to logs.
  • Loading branch information
Achim committed Mar 2, 2024
1 parent c1228bb commit d78205a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion examples/ONE/ONE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,8 @@ void setup() {
u8g2.begin();

/** Show boot display */
displayShowText("One V9", "Lib Ver: " + ag.getVersion(), "");
Serial.println("Firmware Version: "+ag.getVersion());
displayShowText("One V9", "FW Ver: " + ag.getVersion(), "");
delay(DISPLAY_DELAY_SHOW_CONTENT_MS);

/** Init sensor */
Expand Down
14 changes: 8 additions & 6 deletions examples/Open_Air/Open_Air.ino
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ enum {
APP_SM_SERVER_LOST, /** Connected to WiFi network but the server cannot be
reached through the internet, e.g. blocked by firewall
*/
APP_SM_SENSOR_CONFIG_FAILED, /** Server is reachable but there is some
APP_SM_SENSOR_CONFIG_FAILED, /** Server is reachabFirmware nodele but there is some
configuration issue to be fixed on the server
side */
APP_SM_NORMAL,
Expand All @@ -92,12 +92,12 @@ enum {
#define LED_BAR_COUNT_INIT_VALUE (-1) /** */
#define LED_BAR_ANIMATION_PERIOD 100 /** ms */
#define DISP_UPDATE_INTERVAL 5000 /** ms */
#define SERVER_CONFIG_UPDATE_INTERVAL 30000 /** ms */
#define SERVER_CONFIG_UPDATE_INTERVAL 15000 /** ms */
#define SERVER_SYNC_INTERVAL 60000 /** ms */
#define MQTT_SYNC_INTERVAL 60000 /** ms */
#define SENSOR_CO2_CALIB_COUNTDOWN_MAX 5 /** sec */
#define SENSOR_TVOC_UPDATE_INTERVAL 1000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 5000 /** ms */
#define SENSOR_CO2_UPDATE_INTERVAL 4000 /** ms */
#define SENSOR_PM_UPDATE_INTERVAL 2000 /** ms */
#define SENSOR_TEMP_HUM_UPDATE_INTERVAL 5000 /** ms */
#define DISPLAY_DELAY_SHOW_CONTENT_MS 2000 /** ms */
Expand Down Expand Up @@ -906,6 +906,8 @@ void boardInit(void) {
failedHandler("Init I2C failed");
}

Serial.println("Firmware Version: "+ag.getVersion());

ag.watchdog.begin();
ag.button.begin();
ag.statusLed.begin();
Expand Down Expand Up @@ -953,7 +955,7 @@ void boardInit(void) {
}
}

Serial.printf("Firmware node: %s\r\n", getFwMode(fw_mode));
Serial.printf("Firmware Mode: %s\r\n", getFwMode(fw_mode));
}

void failedHandler(String msg) {
Expand Down Expand Up @@ -1409,13 +1411,13 @@ static String getServerSyncData(bool localServer) {

if ((fw_mode == FW_MODE_PPT) || (fw_mode == FW_MODE_PST)) {
if (hasSensorSGP) {
if (tvocIndex > 0) {
if (tvocIndex >= 0) {
root["tvoc_index"] = tvocIndex;
}
if (tvocRawIndex >= 0) {
root["tvoc_raw"] = tvocRawIndex;
}
if (noxIndex > 0) {
if (noxIndex >= 0) {
root["nox_index"] = noxIndex;
}
}
Expand Down

0 comments on commit d78205a

Please sign in to comment.