| | |
| | | Qos2, /* Qos2使用两阶段确认来保证消息的不丢失和不重复。在Qos2情况下,Broker肯定会收到消息,且只收到一次 */ |
| | | }; |
| | | |
| | | #define LUX_TRIGGLE_VAL 0.01 |
| | | enum |
| | | { |
| | | FILLIN_LIGHT_OFF=0, /* disable */ |
| | | FILLIN_LIGHT_ON, /* enable */ |
| | | FILLIN_LIGHT_AUTO, /* auto fill-in light based on LUX sensor detected value */ |
| | | }; |
| | | |
| | | |
| | | typedef struct hwconf_s |
| | | { |
| | | unsigned char enable; /* Hardware enable or not, help to running on X86 */ |
| | | |
| | | int relay; /* relay connected wPI #pin number, if set to 0 means disable */ |
| | | int beep; /* beep connected wPI #pin number, if set to 0 means disable */ |
| | | int relay_pin; /* relay connected wPI #pin number, if set to 0 means disable */ |
| | | int beep_pin; /* beep connected wPI #pin number, if set to 0 means disable */ |
| | | int beep_times; /* default beep count when beep on */ |
| | | |
| | | unsigned char leds; |
| | | int redled; /* redled connect wPI #pin number, if set to 0 means disable */ |
| | | int greenled; /*greenled connect wPI #pin number, if set to 0 means disable */ |
| | | int blueled; /* blueled connect wPI #pin number, if set to 0 means disable */ |
| | | int red_pin; /* redled connect wPI #pin number, if set to 0 means disable */ |
| | | int green_pin; /*greenled connect wPI #pin number, if set to 0 means disable */ |
| | | int blue_pin; /* blueled connect wPI #pin number, if set to 0 means disable */ |
| | | |
| | | unsigned char ds18b20; /* enable or disable temperature sensor ds18b20 */ |
| | | unsigned char sht2x; /* enable or disable temperature and hummidity sensor sht2x */ |
| | | unsigned char lux; /* enable or disable light intensity sensor TSL2561 */ |
| | | |
| | | /* Infrared detect inbreank */ |
| | | unsigned char infrared_pin; /* enable or disable inbreak detected */ |
| | | unsigned char inbreak_beep; /* enable or diable beep when detect inbreak */ |
| | | unsigned char fillin_light; /* fill-in light when detect inbrank or not */ |
| | | unsigned char light_intval; /* fill-in light interval time, unit second */ |
| | | double lux_threshold; /* Lux sensor detect value smaller than treshold will fill-in light */ |
| | | } hwconf_t; |
| | | |
| | | |