python 3 migration

This commit is contained in:
manuel83
2019-08-19 22:51:08 +02:00
parent 63f9f5468b
commit 996bc54768
1363 changed files with 351010 additions and 62 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class DummyTempSensor(SensorActive):
@cbpi.action("My Custom Action")
def my_action(self):
print "HELLO WORLD"
pass
def get_unit(self):
+6 -6
View File
@@ -10,7 +10,7 @@ try:
GPIO.setmode(GPIO.BCM)
except Exception as e:
print e
print(e)
pass
@@ -25,11 +25,11 @@ class GPIOSimple(ActorBase):
GPIO.output(int(self.gpio), 0)
def on(self, power=0):
print "GPIO ON %s" % str(self.gpio)
print("GPIO ON %s" % str(self.gpio))
GPIO.output(int(self.gpio), 1)
def off(self):
print "GPIO OFF"
print("GPIO OFF")
GPIO.output(int(self.gpio), 0)
@cbpi.actor
@@ -67,7 +67,7 @@ class GPIOPWM(ActorBase):
self.p.ChangeDutyCycle(self.power)
def off(self):
print "GPIO OFF"
print("GPIO OFF")
self.p.stop()
@@ -98,10 +98,10 @@ class Dummy(ActorBase):
:param power: int value between 0 - 100
:return:
'''
print "ON"
print("ON")
def off(self):
print "OFF"
print("OFF")