Juan Pablo Giménez hace 5 años
padre
commit
ae64ba1ff4
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      modules/base_plugins/gpio_actor/__init__.py

+ 2
- 1
modules/base_plugins/gpio_actor/__init__.py Ver fichero

@@ -68,7 +68,8 @@ class GPIOPWM(ActorBase):
if self.frequency is None:
self.frequency = 0.5 # 2 sec

self.gpio_inst = GPIO.PWM(int(self.gpio), float(self.frequency))
if self.gpio_inst is None:
self.gpio_inst = GPIO.PWM(int(self.gpio), float(self.frequency))
self.gpio_inst.start(int(self.power))

def set_power(self, power):


Cargando…
Cancelar
Guardar