예제 #1
0
    def __init__(self, model, channel=0, one_channel=True, max_show_time=60):
        super(ShowRunner,
              self).__init__(name="ShowRunner")  # set up the thread
        self.model = model  # Hex class within hex.py
        self.running = True
        self.max_show_time = max_show_time
        self.show_runtime = 0
        self.time_since_reset = 0
        self.external_restart = False  # External trigger to restart show (only for Channel 2)
        self.channel = channel
        self.one_channel = one_channel  # Boolean
        self.num_channels = 1 if one_channel else 2
        self.time_frame_start = datetime.datetime.now()
        self.time_frame_end = datetime.datetime.now()

        # map of names -> show constructors
        show_channel = channel if not self.one_channel else None
        self.shows = dict(shows.load_shows(show_channel))
        self.randseq = shows.random_shows(show_channel)

        # current show object & frame generator
        self.show = None
        self.framegen = None
        self.prev_show = None
        self.show_params = None
예제 #2
0
    def __init__(self, model, queue, max_showtime=240, fail_hard=True):
        super(ShowRunner, self).__init__(name="ShowRunner")
        self.model = model
        self.queue = queue

        self.fail_hard = fail_hard
        self.running = True
        self.max_show_time = max_showtime
        self.show_runtime = 0

        # map of names -> show ctors
        self.shows = dict(shows.load_shows())
        self.randseq = shows.random_shows()
        self.show_params = False

        # current show object & frame generator
        self.show = None
        self.framegen = None
        self.prev_show = None

        # current show parameters

        # show speed multiplier - ranges from 0.5 to 2.0
        # 1.0 is normal speed
        # lower numbers mean faster speeds, higher is slower
        self.speed_x = 1.0
예제 #3
0
    def __init__(self, model, simulator, queue, max_showtime=1000):
        super(ShowRunner, self).__init__(name="ShowRunner")
        self.model = model
        self.simulator = simulator
        self.queue = queue

        self.running = True
        self.max_show_time = max_showtime
        self.show_runtime = 0

        # map of names -> show ctors
        self.shows = dict(shows.load_shows())
        self.randseq = shows.random_shows()

        # current show object & frame generator
        self.show = None
        self.framegen = None

        # current show parameters

        # video is off at the start
        self.video = False

        # show speed multiplier - ranges from 0.1 to 10
        # 1.0 is normal speed
        # lower numbers mean faster speeds, higher is slower
        self.speed_x = 1.0

        # brightness - ranges from 5 to 100%
        # 100% is initial value
        self.brightness_x = 100
예제 #4
0
파일: go.py 프로젝트: stevedudek/Spheres
    def __init__(self, model, simulator, queue, max_showtime=1000):
        super(ShowRunner, self).__init__(name="ShowRunner")
        self.model = model
        self.simulator = simulator
        self.queue = queue

        self.running = True
        self.max_show_time = max_showtime
        self.show_runtime = 0

        # map of names -> show ctors
        self.shows = dict(shows.load_shows())
        self.randseq = shows.random_shows()

        # current show object & frame generator
        self.show = None
        self.framegen = None

        # current show parameters

        # show speed multiplier - ranges from 0.1 to 10
        # 1.0 is normal speed
        # lower numbers mean faster speeds, higher is slower
        self.speed_x = 1.0

        # Percent brightness
        self.brightness_x = 100
예제 #5
0
    def __init__(self, model, simulator, max_showtime=1000, channel=0):
        super(ShowRunner, self).__init__(name="ShowRunner")
        self.model = model
        self.simulator = simulator
        self.running = True
        self.max_show_time = max_showtime
        self.show_runtime = 0
        self.time_since_reset = 0
        self.channel = channel
        self.lock = threading.Lock()  # Prevent overlapping messages

        # map of names -> show constructors
        self.shows = dict(shows.load_shows())
        self.randseq = shows.random_shows()

        # current show object & frame generator
        self.show = None
        self.framegen = None
        self.prev_show = None
        self.show_params = None
예제 #6
0
파일: dual_go.py 프로젝트: stevedudek/Roses
    def __init__(self, model, simulator, max_showtime=1000, channel=0):
        super(ShowRunner, self).__init__(name="ShowRunner")
        self.model = model
        self.simulator = simulator
        self.running = True
        self.max_show_time = max_showtime
        self.show_runtime = 0
        self.time_since_reset = 0
        self.channel = channel
        self.lock = threading.Lock()  # Prevent overlapping messages

        # map of names -> show constructors
        self.shows = dict(shows.load_shows())
        self.randseq = shows.random_shows()

        # current show object & frame generator
        self.show = None
        self.framegen = None
        self.prev_show = None
        self.show_params = None