diff --git a/code/WemosWeatherStation/sensors.h b/code/WemosWeatherStation/sensors.h index 63432d7..6d6a4ce 100644 --- a/code/WemosWeatherStation/sensors.h +++ b/code/WemosWeatherStation/sensors.h @@ -91,9 +91,9 @@ void sensorsLoop() { #if defined(HAS_BARO) Serial.print("[SENSOR] Pressure: "); Serial.print(data.pressure[1], 2); - Serial.print("hPa (abs), "); + Serial.print(" hPa (abs), "); Serial.print(data.pressure[0], 2); - Serial.println("hPa (rel)"); + Serial.println(" hPa (rel)"); Serial.print("[SENSOR] Pressure temp: "); Serial.print(data.temp[0]); Serial.println(" C"); diff --git a/code/WemosWeatherStation/sensors/bmp280.h b/code/WemosWeatherStation/sensors/bmp280.h index 71a36f5..1493692 100644 --- a/code/WemosWeatherStation/sensors/bmp280.h +++ b/code/WemosWeatherStation/sensors/bmp280.h @@ -16,14 +16,14 @@ bool setupBaro() { if (bmp.begin()) { sensor_state |= (1 << 0); +#if defined(DEBUG) + Serial.println("[SENSOR] Baro is online"); +#endif return true; } #if defined(DEBUG) - - if (sensor_state & 0b1) { - Serial.println("[SENSOR] BMP280 did not respond. Please check wiring."); - } + Serial.println("[SENSOR] Baro did not respond. Please check wiring."); #endif diff --git a/code/WemosWeatherStation/sensors/htu21d.h b/code/WemosWeatherStation/sensors/htu21d.h index 3dd5805..1e73b53 100644 --- a/code/WemosWeatherStation/sensors/htu21d.h +++ b/code/WemosWeatherStation/sensors/htu21d.h @@ -5,15 +5,14 @@ bool setupHumidity() { if (htu.begin(SDA, SCL)) { sensor_state |= (1 << 2); +#if defined(DEBUG) + Serial.println("[SENSOR] HTU21D is online"); +#endif return true; } #if defined(DEBUG) - - if (sensor_state & 0b100) { - Serial.println("[SENSOR] HTU21D did not respond. Please check wiring."); - } - + Serial.println("[SENSOR] HTU21D did not respond. Please check wiring."); #endif sensor_state &= ~(1 << 2); diff --git a/code/WemosWeatherStation/sensors/lps35hw.h b/code/WemosWeatherStation/sensors/lps35hw.h index 4a819ff..f45a792 100644 --- a/code/WemosWeatherStation/sensors/lps35hw.h +++ b/code/WemosWeatherStation/sensors/lps35hw.h @@ -6,15 +6,14 @@ bool setupBaro() { lps.setLowPassFilter(LPS35HW::LowPassFilter_ODR9); sensor_state |= (1 << 0); +#if defined(DEBUG) + Serial.println("[SENSOR] LPS35HW is online"); +#endif return true; } #if defined(DEBUG) - - if (sensor_state & 0b1) { - Serial.println("[SENSOR] LPS35HW did not respond. Please check wiring."); - } - + Serial.println("[SENSOR] LPS35HW did not respond. Please check wiring."); #endif sensor_state &= ~(1 << 0); diff --git a/code/WemosWeatherStation/sensors/mcp9808.h b/code/WemosWeatherStation/sensors/mcp9808.h index e6131b4..869fb4f 100644 --- a/code/WemosWeatherStation/sensors/mcp9808.h +++ b/code/WemosWeatherStation/sensors/mcp9808.h @@ -7,15 +7,14 @@ bool setupTemp() { mcp.setResolution(3); mcp.shutdown_wake(0); +#if defined(DEBUG) + Serial.println("[SENSOR] MCP9808 is online"); +#endif return true; } #if defined(DEBUG) - - if (sensor_state & 0b10) { - Serial.println("[SENSOR] MCP9808 did not respond. Please check wiring."); - } - + Serial.println("[SENSOR] MCP9808 did not respond. Please check wiring."); #endif sensor_state &= ~(1 << 1); diff --git a/code/WemosWeatherStation/sensors/sht31d.h b/code/WemosWeatherStation/sensors/sht31d.h index 234465f..53beb60 100644 --- a/code/WemosWeatherStation/sensors/sht31d.h +++ b/code/WemosWeatherStation/sensors/sht31d.h @@ -6,16 +6,15 @@ bool setupHumidity() { if (sht31.periodicStart(SHT3XD_REPEATABILITY_HIGH, SHT3XD_FREQUENCY_10HZ) == SHT3XD_NO_ERROR) { sensor_state |= (1 << 2); +#if defined(DEBUG) + Serial.println("[SENSOR] SHT31D is online"); +#endif return true; } } #if defined(DEBUG) - - if (sensor_state & 0b100) { - Serial.println("[SENSOR] SHT31D did not respond. Please check wiring."); - } - + Serial.println("[SENSOR] SHT31D did not respond. Please check wiring."); #endif sensor_state &= ~(1 << 2);