Guo Wenxue
2019-08-03 415fe8988e579c3185c7ba074733859506c1c7c3
update mqttd program, add buzzer control and test ok
2 files modified
11 ■■■■■ changed files
mqttd/hal/hal.h 1 ●●●● patch | view | raw | blame | history
mqttd/main.c 10 ●●●●● patch | view | raw | blame | history
mqttd/hal/hal.h
@@ -22,6 +22,7 @@
#include "ds18b20.h"
#include "sht20.h"
#include "tsl2561.h"
#include "beep.h"
#define OFF   0
#define ON    1
mqttd/main.c
@@ -464,7 +464,15 @@
            {
                if( strcasestr(value, "on") )
                {
                    log_nrml("Turn buzzer on [%d] times\n", hwconf->beep_times);
            turn_passive_beep(ON, BEEP_FREQ);
                }
        else if( strcasestr(value, "off") )
                {
            turn_passive_beep(OFF, BEEP_FREQ);
                }
        else if( strcasestr(value, "music") )
                {
            play_little_star();
                }
            }