From fbbb2d0b2aba4ddc42651096b20dd4a7ca4a33f2 Mon Sep 17 00:00:00 2001 From: Guo Wenxue <guowenxue@gmail.com> Date: Wed, 21 Sep 2022 23:04:57 +0800 Subject: [PATCH] Merge branch 'master' of ssh://master.iot-yun.club:2280/raspberrypi --- mqttd/etc/conf.h | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/mqttd/etc/conf.h b/mqttd/etc/conf.h index fb26bac..5a5d0c3 100644 --- a/mqttd/etc/conf.h +++ b/mqttd/etc/conf.h @@ -35,22 +35,38 @@ 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; -- Gitblit v1.9.1