From dcf744ff9e0b35b27578c048108c8b380e3a5aea Mon Sep 17 00:00:00 2001 From: Makoto Shimazu Date: Sat, 4 Aug 2018 01:45:16 +0900 Subject: [PATCH] Make it work not on raspberry pi --- mozc-nazoru/src/nazoru/led.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mozc-nazoru/src/nazoru/led.py b/mozc-nazoru/src/nazoru/led.py index 4dadcc7..fa44644 100644 --- a/mozc-nazoru/src/nazoru/led.py +++ b/mozc-nazoru/src/nazoru/led.py @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -class LEDBase(): +class LEDBase(object): def __init__(self, pin): self._pin = pin def on(self): @@ -25,6 +25,8 @@ class LEDBase(): pass def blink(self, interval): pass + def set_brightness(self, brightness): + pass try: import RPi.GPIO as GPIO @@ -134,6 +136,9 @@ except ImportError as e: class LED(LEDBase): pass + class SlowLED(LEDBase): + def __init__(self, pin, delay_ms): + super(SlowLED, self).__init__(pin) LED_BLUE = LED(38) LED_RED = LED(40)