Changeset - e917fb4eea3a
[Not reviewed]
default
0 3 0
Drew Perttula - 8 years ago 2017-03-28 05:04:07
drewp@bigasterisk.com
rm some broken code
Ignore-this: 2548f05c99cf908688fe0c286b6ab02f
3 files changed with 0 insertions and 25 deletions:
0 comments (0 inline, 0 general)
light9/Fadable.py
Show inline comments
 
@@ -140,25 +140,12 @@ class Fadable:
 
            if self.last_level == 0: # we don't want last_level to be zero,
 
                                     # since it will make us toggle between 0
 
                                     # and 0
 
                newlevel = 1
 
            else:
 
                newlevel = 0
 
        else:
 
            newlevel = self.last_level
 
            self.last_level = None
 

	
 
        self.set_var_rounded(newlevel)
 

	
 
if __name__ == "__main__":
 
    class SubScale(Scale, Fadable):
 
        def __init__(self, master, *args, **kw):
 
            self.scale_var = DoubleVar()
 
            kw['variable'] = self.scale_var
 
            Scale.__init__(self, master, *args, **kw)
 
            Fadable.__init__(self, var=self.scale_var)
 

	
 
    root = Tk()
 
    root.tk_focusFollowsMouse()
 
    ss = SubScale(root, from_=1, to_=0, res=0.01)
 
    ss.pack()
 
    mainloop()
light9/Submaster.py
Show inline comments
 
@@ -366,23 +366,12 @@ def get_sub_by_name(name, submasters=Non
 
    except ValueError:
 
        pass
 

	
 
    try:
 
        subnum = get_dmx_channel(name)
 
        s = Submaster("'%s'" % name, levels={subnum : 1.0})
 
        return s
 
    except ValueError:
 
        pass
 

	
 
    # make an error sub
 
    return Submaster('%s' % name, levels=ValueError)
 

	
 
if __name__ == "__main__":
 
    reload_data()
 
    s = Submasters()
 
    print 'subs', s.get_all_subs()
 
    if 0: # turn this on to normalize all subs
 
        for sub in s.get_all_subs():
 
            print "before", sub
 
            sub.normalize_patch_names()
 
            sub.save()
 
            print "after", sub
light9/collector/device.py
Show inline comments
 
@@ -2,25 +2,24 @@ from __future__ import division
 
import logging
 
import math
 
from light9.namespaces import L9, RDF, DEV
 
from rdflib import Literal
 
from webcolors import hex_to_rgb, rgb_to_hex
 
from colormath.color_objects import sRGBColor, CMYColor
 
import colormath.color_conversions
 

	
 
log = logging.getLogger('device')
 

	
 

	
 
class Device(object):
 
    def setAttrs():
 
        pass
 

	
 

	
 
class ChauvetColorStrip(Device):
 
    """
 
     device attrs:
 
       color
 
    """
 
        
 
class Mini15(Device):
 
    """
 
    plan:
0 comments (0 inline, 0 general)