From fa05fe6bfd8ceab1082249fd7b41fb3a0e6693cd Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Wed, 31 Jul 2019 13:06:01 +0800 Subject: [PATCH] update setup_wiringPi shell --- mqttd/main.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/mqttd/main.c b/mqttd/main.c index 2c99317..be26876 100644 --- a/mqttd/main.c +++ b/mqttd/main.c @@ -359,7 +359,7 @@ value = cJSON_Print(item); /* light controled by relay */ - if( hwconf->relay && !strcasecmp(item->string, "light") ) + if( hwconf->relay_pin && !strcasecmp(item->string, "light") ) { if( strcasestr(value, "on") ) { @@ -374,15 +374,11 @@ } /* buzzer */ - if( hwconf->beep && !strcasecmp(item->string, "buzzer") ) + if( hwconf->beep_pin && !strcasecmp(item->string, "buzzer") ) { if( strcasestr(value, "on") ) { - log_nrml("Turn buzzer on\n"); - } - else if( strcasestr(value, "music") ) - { - log_nrml("Turn buzzer play music\n"); + log_nrml("Turn buzzer on [%d] times\n", hwconf->beep_times); } } -- Gitblit v1.9.1