Przeglądaj źródła

add: FX-Off time static 0.5

micha 3 lat temu
rodzic
commit
78fb535405
1 zmienionych plików z 11 dodań i 4 usunięć
  1. 11 4
      console.py

+ 11 - 4
console.py

@@ -529,11 +529,18 @@ class DMXCH(object):
             except Exception as e:
                 print( "Except:flash",target,ftime,clock,__name__,e,)
     def flash_fx(self,xtype="sinus",size=40,speed=40,invert=0,width=100,start=0,offset=0,base="",clock=0,master=None):
-        cprint("flash_fx",xtype)
+
+        if self._flash_fx is not None :
+            cprint("flash_fx",xtype)
+
         if str(xtype).lower() == "off":
-            #self._fx = Fade(self._fx_value,target=0,ftime=2,clock=clock) 
-            self._flash_fx = None
-            self._flash_fx_value = 0 
+            fx_value = self._fx_value
+            if fx_value != 0:
+                cprint("???????______ FX OFF AS FADE",fx_value,0,255)
+                self._flash_fx = Fade(fx_value,0,ftime=0.5,clock=clock)#,delay=delay)
+            else:
+                self._flash_fx = None 
+                self._flash_fx_value = 0 
         else:
             self._flash_fx = FX(xtype=xtype,size=size,speed=speed,invert=invert,width=width,start=start,offset=offset,base=base,clock=clock,master=master)