mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
some tiny updates
This commit is contained in:
parent
22d549ca3d
commit
83ab20bb11
@ -724,6 +724,7 @@
|
|||||||
// -- Serial sensors ------------------------------
|
// -- Serial sensors ------------------------------
|
||||||
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
||||||
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
||||||
|
//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7code)
|
||||||
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||||
#define CO2_HIGH 1200 // Above this CO2 value show red light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
#define CO2_HIGH 1200 // Above this CO2 value show red light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||||
//#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code)
|
//#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code)
|
||||||
|
@ -340,6 +340,7 @@
|
|||||||
|
|
||||||
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
||||||
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
||||||
|
//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7 code)
|
||||||
#ifndef CO2_LOW
|
#ifndef CO2_LOW
|
||||||
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||||
#endif
|
#endif
|
||||||
@ -476,6 +477,7 @@
|
|||||||
|
|
||||||
#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
||||||
#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
||||||
|
#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7 code)
|
||||||
#ifndef CO2_LOW
|
#ifndef CO2_LOW
|
||||||
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,8 +87,8 @@ enum LegacyUserSelectablePins {
|
|||||||
GPI8_LED4_INV,
|
GPI8_LED4_INV,
|
||||||
GPI8_MHZ_TXD, // MH-Z19 Serial interface
|
GPI8_MHZ_TXD, // MH-Z19 Serial interface
|
||||||
GPI8_MHZ_RXD, // MH-Z19 Serial interface
|
GPI8_MHZ_RXD, // MH-Z19 Serial interface
|
||||||
GPI8_CM11_TXD, // CM110x Serial interface
|
GPI8_CM11_TXD, // CM110x Serial interface
|
||||||
GPI8_CM11_RXD, // CM110x Serial interface
|
GPI8_CM11_RXD, // CM110x Serial interface
|
||||||
GPI8_PZEM0XX_TX, // PZEM0XX Serial interface
|
GPI8_PZEM0XX_TX, // PZEM0XX Serial interface
|
||||||
GPI8_PZEM004_RX, // PZEM004T Serial interface
|
GPI8_PZEM004_RX, // PZEM004T Serial interface
|
||||||
GPI8_SAIR_TX, // SenseAir Serial interface
|
GPI8_SAIR_TX, // SenseAir Serial interface
|
||||||
|
@ -215,8 +215,8 @@ void CM11EverySecond(void)
|
|||||||
while (((millis() - start) < CM1107_READ_TIMEOUT) && (counter < resp_len)) {
|
while (((millis() - start) < CM1107_READ_TIMEOUT) && (counter < resp_len)) {
|
||||||
if (CM11Serial->available() > 0) {
|
if (CM11Serial->available() > 0) {
|
||||||
cm11_response[counter++] = CM11Serial->read();
|
cm11_response[counter++] = CM11Serial->read();
|
||||||
if (counter ==2 && cm11_response[0] == 0x16) {
|
if (counter ==2 && cm11_response[0] == 0x16) { //0x16 - first byte in response
|
||||||
resp_len = cm11_response[1] +3 ;
|
resp_len = cm11_response[1] +3 ; // Get expected response len (according protocol desc), +3 - first byte, len and checksum
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
delay(5);
|
delay(5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user