GPIO.reload()
    GPIO.handle_cmd(<cmd>)
"""
import yaml
import time
import logging
from threading import Thread

# Import GPIO module -- either the dummy or the real lib
try:
    import RPi.GPIO as RPiGPIO
    is_dummy_gpio = False

except ImportError:
    import dummy
    RPiGPIO = dummy.Dummy()
    is_dummy_gpio = True

except:
    # Will alert user if not run as root.
    raise

# BCM Mode uses GPIO ids, BOARD Mode uses pin ids
GPIO_MODE = RPiGPIO.BCM


# Scheduled command thread
class AsyncCmd(Thread):
    is_cancelled = False
    is_finished = False
Beispiel #2
0
 def setUp(self):
     self.converter = dummy.Dummy()
Beispiel #3
0
 def test_add(self):
     d = dummy.Dummy()
     self.assertEqual(d.add(1, 2), 3)
Beispiel #4
0
 def test_mul(self):
     d = dummy.Dummy()
     self.assertEqual(d.mul(1, 2), 2)
Beispiel #5
0
 def test_sub(self):
     d = dummy.Dummy()
     self.assertEqual(d.sub(1, 2), -1)
Beispiel #6
0
import dummy
""" Engine list used by the apibert. Objects in the list can be either class 
instances, or modules
"""
engine_list_ = {'dummy': dummy.Dummy()}


def get_engines():
    return engine_list_