瀏覽代碼

Merge pull request #1 from Manuel83/master

Update
tags/3.1_alpha
swimIan GitHub 8 年之前
父節點
當前提交
9c44d3ff62
共有 2 個檔案被更改,包括 4 行新增3 行删除
  1. +1
    -1
      install.sh
  2. +3
    -2
      modules/buzzer/__init__.py

+ 1
- 1
install.sh 查看文件

@@ -136,7 +136,7 @@ show_menu () {
fi
;;
10)
confirmAnswer "Are you sure you want to reboo the Raspberry Pi?"
confirmAnswer "Are you sure you want to reboot the Raspberry Pi?"
if [ $? = 0 ]; then
sudo reboot
else


+ 3
- 2
modules/buzzer/__init__.py 查看文件

@@ -13,12 +13,13 @@ class Buzzer(object):
def __init__(self, gpio):
try:
cbpi.app.logger.info("INIT BUZZER NOW GPIO%s" % gpio)
self.gpio = gpio
self.gpio = int(gpio)
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio, GPIO.OUT)
GPIO.setup(self.gpio, GPIO.OUT)
self.state = True
cbpi.app.logger.info("BUZZER SETUP OK")
except Exception as e:
cbpi.app.logger.info("BUZZER EXCEPTION %s" % str(e))
self.state = False

def beep(self):


Loading…
取消
儲存