From 7204f85a3afe58b2833e11382f477e67eaddbcba Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 21 May 2019 10:39:54 +0200 Subject: [PATCH] Add support for SPS30 Particle sensor thanks to Gerhard Mutz (#5830) Add support for SPS30 Particle sensor thanks to Gerhard Mutz (#5830) --- sonoff/_changelog.ino | 1 + sonoff/settings.h | 3 ++- sonoff/xsns_44_sps30.ino | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 4e4ef94e6..15556b72d 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -5,6 +5,7 @@ * Add HX711 weight restore after controlled restart or after power restore just before executing command Sensor34 7 (#5367, #5786) * Remove define USE_EMULATION from my_user_config.h (#5826) * Add defines USE_EMULATION_WEMO and USE_EMULATION_HUE to my_user_config.h to control emulation features at compile time (#5826) + * Add support for SPS30 Particle sensor thanks to Gerhard Mutz (#5830) * * 6.5.0.10 20190513 * Enable ADC0 by default in my_user_config.h (#5671) diff --git a/sonoff/settings.h b/sonoff/settings.h index 199c85f62..03529e8fa 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -211,8 +211,9 @@ struct SYSCFG { uint8_t weblog_level; // 1AC uint8_t mqtt_fingerprint[2][20]; // 1AD - uint8_t free_1D5[20]; // 1D5 Free since 5.12.0e + uint8_t free_1D5[19]; // 1D5 Free since 5.12.0e + uint8_t sps30_inuse_hours; // 1E8 char mqtt_host[33]; // 1E9 - Keep together with below as being copied as one chunck with reset 6 uint16_t mqtt_port; // 20A - Keep together char mqtt_client[33]; // 20C - Keep together diff --git a/sonoff/xsns_44_sps30.ino b/sonoff/xsns_44_sps30.ino index 1cc4267b9..dfb96b912 100644 --- a/sonoff/xsns_44_sps30.ino +++ b/sonoff/xsns_44_sps30.ino @@ -146,9 +146,9 @@ const char HTTP_SNS_SPS30_c[] PROGMEM ="{s}SPS30 " "TYPSIZ" "{m}%s " "um" "{e}"; #define PMDP 2 -//#define SPS30_HOURS Settings.sps30_inuse_hours -#define SPS30_HOURS sps30_inuse_hours -uint8_t sps30_inuse_hours; +#define SPS30_HOURS Settings.sps30_inuse_hours +//#define SPS30_HOURS sps30_inuse_hours +//uint8_t sps30_inuse_hours; void SPS30_Every_Second() {