コード例 #1
0
ファイル: radio.py プロジェクト: castrofernandez/raspberry-pi
 def setup(self, config):
   self.ready = False
   MenuOption.setup(self, config)
   if 'Radio Stations' in self.config.sections():
     self.stations = self.config.options('Radio Stations')
     self.ready = True
     self.start()
コード例 #2
0
ファイル: camera.py プロジェクト: monkeymademe/dotsnap
    def __init__(self, settings):
        MenuOption.__init__(self)
	self.settings=settings
	self.mode = 0
	self.current_iso = 0
	self.current_hflip = False
	self.current_vflip = False
コード例 #3
0
    def setup(self, config):
        MenuOption.setup(self, config)
        
        self.whitelist = self.getWhitelist(config)
        self.blacklist = self.getBlacklist(config)
        self.whitelist_status = self.getWhitelistStatus(config)
        self.blacklist_status = self.getBlacklistStatus(config)

        lcd.create_char(0, [0, 4, 14, 0, 0, 14, 4, 0])  # Up down arrow

        # init webclient
        self.webclient = Webclient(config)
        
        # get the modules as JSON
	complete_modules = self.getModules()
	
        for line in complete_modules:
            if self.whitelist:
                if line in self.whitelist:
                    self.modules.append(line)
            else:
                self.modules.append(line)
          
            if self.blacklist_status:
                if line in self.blacklist and line in self.modules:
                    self.modules.remove(line)

	self.ready = True
コード例 #4
0
	def __init__(self):
		self.mode = 0 # 0:Player View, 1:Menu
		self.selindex = 0
		self.options = [
			"Pause",
			"Back"
		]
		self.actions = [
			self.do_play,
			self.do_back
		]
		self.mpd = MPDClient()
		self.mpd.timeout = 10
		self.mpd.idletimeout = None
		self.is_setup = False

		# Icons
		self.anim_play = [[0,0,8,12,14,12,8,0],[0,0,4,6,7,6,4,0],[0,0,2,3,19,3,2,0],[0,0,1,17,25,17,1,0],[0,0,16,24,28,24,16,0]]
		self.anim_pause = [[0,0,0,0,0,0,0,0],[0,27,27,27,27,27,27,0]]
		self.icon_stop = [0,0,31,31,31,31,31,0]
		
		try:
			self.mpd.connect("localhost", 6600)
		except socket.error:
			print("Could not connect to MPD")
		
		MenuOption.__init__(self)
コード例 #5
0
ファイル: menu.py プロジェクト: akx/dot3k
 def __init__(self):
     self.start = self.millis()
     self.invader = [
         [14, 31, 21, 31, 9, 18, 9, 18],
         [14, 31, 21, 31, 18, 9, 18, 9]
     ]
     MenuOption.__init__(self)
コード例 #6
0
	def __init__(self):
		hostapd_config = self.read_config_file('/etc/hostapd/hostapd.conf')

		self.ssid = str(util_get_safe_from_map(hostapd_config,'ssid'))
		self.psk = str(util_get_safe_from_map(hostapd_config,'wpa_passphrase'))

		MenuOption.__init__(self)
コード例 #7
0
  def __init__(self):
    self.selected_option = 0

    self.options = [
      'Pirate',
      'Monkey',
      'Robot',
      'Ninja',
      'Dolphin'
    ]

    '''
    Python has no "switch" so we'll store an array of functions
    to call when an option is selected
    '''
    self.actions = [
      self.handle_pirate,
      self.handle_monkey,
      self.handle_robot,
      self.handle_ninja,
      self.handle_dolphin,
    ]

    '''
    We want to give each menu option a status icon too, and
    here's a place to store them.
    '''
    self.icons = [None] * 5

    MenuOption.__init__(self)
コード例 #8
0
 def __init__(self):
     self.icon_eth = [0,0,4,4,21,21,17,31]
     self.icon_wifi = [0,0,14,17,4,10,0,4,0,0]
     self.icon_br = [0,4,12,31,0,31,6,4,0]
     self.refresh_ips()
     self.is_setup = False
     MenuOption.__init__(self)
コード例 #9
0
ファイル: volume.py プロジェクト: GeorgN/dot3k
 def setup(self, config):
   MenuOption.setup(self, config)
   self.edit_mode = EDIT_VOLUME
   self.volume = int(self.get_option('Sound','volume',80))
   self.set_volume()
   self.actual_volume = self.get_volume()
   self.output_mode = self.get_mode()
コード例 #10
0
ファイル: debris.py プロジェクト: Cloudsimc/dot3k
  def __init__(self):
    self.debug = False
    self.debris = []
    self.stars = []
    self.running = False
    self.max_debris = 10
    self.max_stars  = 10
    self.last_update = 0
    self.time_start = 0
    self.sprites = [
      [14,31,31,14,0 ,0 ,0 ,0 ], # 0: Debris top of char
      [0 ,0 ,0 ,0 ,14,31,31,14], # 1: Debris bottom of char
      [30,5 ,7 ,30,0 ,0 ,0 ,0 ], # 2: Ship top of char
      [0 ,0 ,0 ,0 ,30,5 ,7, 30], # 3: Ship bottom of char

      [30,5 ,7 ,30,14,31,31,14], # 4: Ship above debris
      [14,31,31,14,30,5 ,7, 30], # 5: Ship below debris
    ]
    self.width  = 16
    self.height = 5 # Two rows per char
  
    self.player_x = 1 # Player horizontal position
    self.player_y = 3 # Player vertical position

    self.current_player_x   = None
    self.current_player_y   = None
    self.current_player_pos = None

    self.fill_debris()

    MenuOption.__init__(self)
コード例 #11
0
ファイル: mgtext.py プロジェクト: mattgemmell/DOT-MGTextEntry
	def __init__(self):

		self.cols = 16
		self.initialized = False
		
		self.scroll_up_icon = chr(0)
		self.scroll_down_icon = chr(1)
		self.abbreviation_icon = chr(2)
		self.placeholder_icon = chr(3)
		self.caps_on = True
		self.symbols_mode = False
		self.cancel_aborts = False # by default, Cancel button acts as Delete
		self.selection = {'row': 0, 'option': 0}
		self.first_displayed_row = 0
		
		self.uppercase_letters = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
		self.lowercase_letters = list('abcdefghijklmnopqrstuvwxyz')
		self.space_symbol = 'Spc'
		self.line_break = '\n' # for layout only; can't be entered
		self.numbers = list('0123456789')
		self.quick_punctuation = list('./:@')
		self.symbols = list('./:@\'"~+-=_!?,;()[]<>{}\\^|&*$%#`')
		self.caps_command = "Caps"
		self.symbols_command = "More"
		self.delete_command = "Del"
		self.cancel_command = "Cancel"
		self.commit_command = "Accept"
		self.commands = [self.caps_command, self.symbols_command, self.delete_command, self.cancel_command, self.commit_command]
		
		self.uppercase_set = self.uppercase_letters
		self.uppercase_set.append(self.space_symbol)
		self.uppercase_set.extend(self.numbers)
		self.uppercase_set.extend(self.quick_punctuation)
		self.uppercase_set.extend(self.commands)
		
		self.lowercase_set = self.lowercase_letters
		self.lowercase_set.append(self.space_symbol)
		self.lowercase_set.extend(self.numbers)
		self.lowercase_set.extend(self.quick_punctuation)
		self.lowercase_set.extend(self.commands)
		
		self.symbols_set = self.symbols
		self.symbols_set.append(self.line_break)
		self.symbols_set.extend(self.commands)
		
		self.confirm_accept = "Yes"
		self.confirm_cancel = "No"
		self.confirm_quit = "Quit"
		self.confirm_set = [self.confirm_accept, self.confirm_cancel, self.confirm_quit]
		
		self.display_map = [] # 2D array of options
		self.display_ranges = [] # 2D array of range-arrays with option extents

		self.entered_text = ''
		self.confirming = False

		MenuOption.__init__(self)

		self.is_setup = False
コード例 #12
0
ファイル: radio.py プロジェクト: j4y-funabashi/orac
    def __init__(self):
        self.selected_option = 0
        self.options = [
                {'title': 'Play', 'action': self.handle_play, 'icon': ' '},
                {'title': 'Stop', 'action': self.handle_stop, 'icon': ' '}
                ]

        MenuOption.__init__(self)
コード例 #13
0
    def __init__(self):
	self.ready = False
	self.config = ConfigObj("init.conf")
	self.cmds = None
	self.selected_cmd = 0
	self.last_update = 0
	
	MenuOption.__init__(self)	
コード例 #14
0
    def __init__(self):
        self.consoleMessages = ConsoleMessages()
	self.ready = False
	self.modules = []
	self.selected_module = 0	
	self.last_update = 0
	
        MenuOption.__init__(self)
コード例 #15
0
ファイル: graph.py プロジェクト: akx/dot3k
 def __init__(self):
     self.last = self.millis()
     self.last_update = 0
     self.raw_dlold = 0
     self.raw_ulold = 0
     self.dlspeed = 0
     self.ulspeed = 0
     self.iface = 'eth0'
     MenuOption.__init__(self)
コード例 #16
0
ファイル: utils.py プロジェクト: Cloudsimc/dot3k
 def __init__(self, backlight):
   self.backlight = backlight
   self.hue = 0
   self.sat = 100
   self.val = 100
   self.mode = 0
   self.modes = ['h','s','v','r','g','b']
   self.from_hue()
   MenuOption.__init__(self)
コード例 #17
0
  def __init__(self):
    self.items = []

    self.selected_item = 0

    self.scanning = False

    MenuOption.__init__(self)
    
    self.is_setup = False
コード例 #18
0
ファイル: utils.py プロジェクト: sandyjmacdonald/dot3k
 def __init__(self, backlight):
   self.backlight = backlight
   self.hue = 0
   self.sat = 100
   self.val = 100
   self.mode = 0
   self.modes = ['h','s','v','r','g','b','e']
   self.from_hue()
   self._icons_setup = False
   MenuOption.__init__(self)
コード例 #19
0
ファイル: stocks.py プロジェクト: Cloudsimc/dot3k
  def __init__(self):
    self.companies = ['GOOG','AAPL','TWTR','FB']
    self.data = {}
    self.company = 0

    self.last_update = 0
    self.last_event = 0

    MenuOption.__init__(self)
    
    self.is_setup = False
コード例 #20
0
ファイル: wlan.py プロジェクト: GeorgN/dot3k
  def __init__(self, backlight=None):
    self.items = []

    self.selected_item = 0

    self.scanning = False

    self.backlight = backlight

    MenuOption.__init__(self)
    
    self.is_setup = False
コード例 #21
0
ファイル: wunderground.py プロジェクト: doigal/Dot3kPlugins
  def __init__(self):
    self.last = self.millis()
    self.last_update = 0
    
    self.apikey = 'MissingAPI'
    self.stations = 'MissingStat'

    self.weatherconditionsresult = ''

    self.is_setup = False
        
    MenuOption.__init__(self)
コード例 #22
0
ファイル: wunderground.py プロジェクト: doigal/Dot3kPlugins
 def __init__(self):
   self.last = self.millis()
   self.last_update = 0
   
   self.apikey = 'MissingAPI'
   self.stations = 'MissingStat'
   
   self.WU_Alerts_Result = ''
   
   self.is_setup = False
   
   MenuOption.__init__(self)
コード例 #23
0
ファイル: utils.py プロジェクト: gcWorld/dot3k
 def __init__(self, backlight):
     self.backlight = backlight
     self.hue = 0
     self.sat = 100
     self.val = 100
     self.mode = 0
     self.r = 0
     self.g = 0
     self.b = 0
     self.modes = ["h", "s", "v", "r", "g", "b", "e"]
     self.from_hue()
     self._icons_setup = False
     MenuOption.__init__(self)
コード例 #24
0
ファイル: wunderground.py プロジェクト: doigal/Dot3kPlugins
 def __init__(self):
   self.last = self.millis()
   self.last_update = 0
   self.modes = ['P1','P2','P3','P4','P5','P6','P7','P8']
   self.mode = 0
   
   self.apikey = 'MissingAPI'
   self.stations = 'MissingStat'
   
   self.WU_Fcst_Result = ''
   
   self.is_setup = False
   
   MenuOption.__init__(self)
コード例 #25
0
ファイル: volume.py プロジェクト: GeorgN/dot3k
 def __init__(self, backlight = None):
   MenuOption.__init__(self)
   self.output_options = {
                          MODE_AUTO: 'Auto',
                          MODE_HEADPHONES: 'Headphones',
                          MODE_HDMI: 'HDMI'
                         }
   self.output_mode = -1
   self.volume = None
   self.backlight = backlight
   self.actual_volume = 0
   self.last_update = 0
   self.edit_mode = EDIT_VOLUME
   self._icons_setup = False
コード例 #26
0
 def __init__(self, backlight=None):
     MenuOption.__init__(self)
     self.output_options = {
         MODE_AUTO: 'Auto',
         MODE_HEADPHONES: 'Headphones',
         MODE_HDMI: 'HDMI'
     }
     self.output_mode = -1
     self.volume = None
     self.backlight = backlight
     self.actual_volume = 0
     self.last_update = 0
     self.edit_mode = EDIT_VOLUME
     self._icons_setup = False
コード例 #27
0
ファイル: clock.py プロジェクト: Cloudsimc/dot3k
  def __init__(self):
    self.modes = ['date','week','binary','dim','bright']
    self.mode = 0
    self.binary = True
    self.running = False

    self.option_time = 0

    self.dim_hour = 20
    self.bright_hour = 8

    self.is_setup = False

    MenuOption.__init__(self)
コード例 #28
0
ファイル: clock.py プロジェクト: sandyjmacdonald/dot3k
  def __init__(self, backlight = None):
    self.modes = ['date','week','binary','dim','bright']
    self.mode = 0
    self.binary = True
    self.running = False
    self.backlight = backlight

    self.option_time = 0

    self.dim_hour = 20
    self.bright_hour = 8

    self.is_setup = False

    MenuOption.__init__(self)
コード例 #29
0
    def __init__(self):
        self.selected_option = 0

        self.options = ['Pirate', 'Monkey', 'Robot', 'Ninja', 'Dolphin']
        """
        Python has no "switch" so we'll store an array of functions
        to call when an option is selected
        """
        self.actions = [
            self.handle_pirate,
            self.handle_monkey,
            self.handle_robot,
            self.handle_ninja,
            self.handle_dolphin,
        ]

        MenuOption.__init__(self)
コード例 #30
0
    def __init__(self):

        self.items = []

        self.selected_item = 0

        self.last_update = 0
        self.updating = False

        self.last_event = 0

        MenuOption.__init__(self)

        self.is_setup = False

        self.auto_cycle_timeout = 10000  # Start auto advancing after n/1000 sec of no user interaction
        self.auto_cycle_speed = 10000  # Time between advances
コード例 #31
0
ファイル: radio.py プロジェクト: Corteil/dot3k
 def __init__(self):
     MenuOption.__init__(self)
     self.selected_station = 0
     self.selected_option = 0
     self.pid = None
     self.socket = None
     self.current_stream = None
     self.current_state = None
     # Keep track of whether we've started a VLC instance
     self.started_vlc_instance = False
     self.last_update = 0
     self.mode = 'main'
     atexit.register(self.kill)
     self.icons = {
         'play': [0, 24, 30, 31, 30, 24, 0, 0],
         'pause': [0, 27, 27, 27, 27, 27, 0, 0],
         'stop': [0, 31, 31, 31, 31, 31, 0, 0]
     }
コード例 #32
0
    def __init__(self, backlight=None, interface='wlan0'):
        self.items = []
        self.interface = interface

        self.wifi_pass = ""

        self.selected_item = 0

        self.connecting = False
        self.scanning = False
        self.has_error = False
        self.error_text = ""

        self.backlight = backlight

        MenuOption.__init__(self)

        self.is_setup = False
コード例 #33
0
ファイル: radio.py プロジェクト: castrofernandez/raspberry-pi
 def __init__(self):
   MenuOption.__init__(self)
   self.selected_station = 0
   self.selected_option = 0
   self.pid = None
   self.socket = None
   self.current_stream = None
   self.current_state = None
   # Keep track of whether we've started a VLC instance
   self.started_vlc_instance = False
   self.last_update = 0
   self.mode = 'main'
   atexit.register(self.kill)
   self.icons = {
     'play': [0,24,30,31,30,24,0,0],
     'pause':[0,27,27,27,27,27,0,0],
     'stop': [0,31,31,31,31,31,0,0]
   }
コード例 #34
0
ファイル: wlan.py プロジェクト: akx/dot3k
    def __init__(self, backlight=None, interface='wlan0'):
        self.items = []
        self.interface = interface

        self.wifi_pass = ""

        self.selected_item = 0

        self.connecting = False
        self.scanning = False
        self.has_error = False
        self.error_text = ""

        self.backlight = backlight

        MenuOption.__init__(self)

        self.is_setup = False
コード例 #35
0
    def __init__(self, backlight=None):
        self.modes = ['date', 'dim', 'bright']
        self.mode = 0
        self.running = False

        if backlight is None:
            import dot3k.backlight
            self.backlight = dot3k.backlight
        else:
            self.backlight = backlight

        self.option_time = 0

        self.dim_hour = 20
        self.bright_hour = 8

        self.is_setup = False

        MenuOption.__init__(self)
コード例 #36
0
ファイル: clock.py プロジェクト: monkeymademe/dotsnap
    def __init__(self, backlight=None):
        self.modes = ['date', 'week', 'binary', 'dim', 'bright']
        self.mode = 0
        self.binary = True
        self.running = False

        if backlight is None:
            import dot3k.backlight
            self.backlight = dot3k.backlight
        else:
            self.backlight = backlight

        self.option_time = 0

        self.dim_hour = 20
        self.bright_hour = 8

        self.is_setup = False

        MenuOption.__init__(self)
コード例 #37
0
  def __init__(self):
    self.selected_option = 0

    """
    Python has no "switch" so we'll store an array of functions
    to call when an option is selected.

    We've added icons to this example, so instead of two arrays
    we've collected all the related stuff into an array of
    dictionaries.
    """
    self.options = [
      {'title': 'Pirate', 'action': self.handle_pirate,   'icon': ' '}
      {'title': 'Pirate', 'action': self.handle_monkey,   'icon': ' '}
      {'title': 'Pirate', 'action': self.handle_robot,    'icon': ' '}
      {'title': 'Pirate', 'action': self.handle_ninja,    'icon': ' '}
      {'title': 'Pirate', 'action': self.handle_dolphin,  'icon': ' '}
    ]

    MenuOption.__init__(self)
コード例 #38
0
    def __init__(self):
        self.modes = ['date', 'week', 'binary', 'dim', 'bright']
        self.mode = 0
        self.binary = True
        self.running = False

        #        if backlight is None:
        #            import dot3k.backlight
        #            self.backlight = dot3k.backlight
        #        else:
        #            self.backlight = backlight

        self.option_time = 0

        #        self.dim_hour = 20
        #        self.bright_hour = 8

        self.is_setup = False

        MenuOption.__init__(self)
コード例 #39
0
    def __init__(self, backlight=None):
        if backlight is None:
            import dot3k.backlight
            self.backlight = dot3k.backlight
        else:
            self.backlight = backlight

        self.debug = False
        self.star_seed = 'thestarsmydestination'
        self.debris_seed = 'piratemonkeyrobotninja'
        self.debris = []
        self.stars = []
        self.running = False
        self.max_debris = 10
        self.max_stars = 10
        self.last_update = 0
        self.time_start = 0
        self.sprites = [
            [14, 31, 31, 14, 0, 0, 0, 0],  # 0: Debris top of char
            [0, 0, 0, 0, 14, 31, 31, 14],  # 1: Debris bottom of char
            [30, 5, 7, 30, 0, 0, 0, 0],  # 2: Ship top of char
            [0, 0, 0, 0, 30, 5, 7, 30],  # 3: Ship bottom of char

            [30, 5, 7, 30, 14, 31, 31, 14],  # 4: Ship above debris
            [14, 31, 31, 14, 30, 5, 7, 30],  # 5: Ship below debris

            [0, 14, 31, 31, 31, 31, 14, 0]  # 6: Giant debris
        ]
        self.width = 16
        self.height = 5  # Two rows per char

        self.player_x = 1  # Player horizontal position
        self.player_y = 3  # Player vertical position

        self.current_player_x = None
        self.current_player_y = None
        self.current_player_pos = None

        self.fill_debris()

        MenuOption.__init__(self)
コード例 #40
0
ファイル: cust.py プロジェクト: netr0m/AKT-bus-list
    def __init__(self):
        # IP
        self.wlan0 = self.get_addr('wlan0')
        self.mode = 0

        # TIMEDATE
        self.running = False

        # if backlight is None:
        # import dot3k.backlight
        # self.backlight = dot3k.backlight
        # else:
        # self.backlight = backlight

        self.option_time = 0

        # self.dim_hour = 23
        # self.bright_hour = 10

        self.is_setup = False

        MenuOption.__init__(self)
コード例 #41
0
ファイル: text.py プロジェクト: sandyjmacdonald/dot3k
  def __init__(self):

    self.mode        = _MODE_ENTRY
    self.input_prompt= ''

    self.initialized = False
    self.back_icon   = chr(0)
    self.entry_char  = 0
    self.entry_mode  = 0
    self.entry_chars = [list('\'|~+-_!?.0123456789'+self.back_icon+' abcdefghijklmnopqrstuvwxyz' + self.back_icon),
					   list('"<>{}()[]:;/\^&*$%#'+self.back_icon+'@ABCDEFGHIJKLMNOPQRSTUVWXYZ'  + self.back_icon)]

    self.entry_text  = [' ']*16

    self.confirm = 0
    self.final_text = ''

    self.entry_position = 0

    MenuOption.__init__(self)
    
    self.is_setup = False
コード例 #42
0
ファイル: settings.py プロジェクト: PeterCopeland/repline
 def __init__(self, repline):
     self.repline = repline
     self._icons_setup = False
     MenuOption.__init__(self)
コード例 #43
0
 def __init__(self, backlight):
     self.backlight = backlight
     self.brightness = 1.0
     self._icons_setup = False
     MenuOption.__init__(self)
コード例 #44
0
 def __init__(self, lcd):
     self.lcd = lcd
     self.contrast = 30
     self._icons_setup = False
     MenuOption.__init__(self)
コード例 #45
0
 def __init__(self):
     self.start = self.millis()
     self.invader = [[14, 31, 21, 31, 9, 18, 9, 18],
                     [14, 31, 21, 31, 18, 9, 18, 9]]
     MenuOption.__init__(self)
コード例 #46
0
ファイル: text.py プロジェクト: jeffbr13/op-pi
 def setup(self, config):
     MenuOption.setup(self, config)
コード例 #47
0
ファイル: graph.py プロジェクト: terrorizer1980/displayotron
 def __init__(self):
     self.mode = 0
     self.wlan0 = self.get_addr('wlan0')
     self.eth0 = self.get_addr('eth0')
     self.is_setup = False
     MenuOption.__init__(self)
コード例 #48
0
    def setup(self, config):
        MenuOption.setup(self, config)

        if 'commands' in self.config.sections():
            self.cmds = self.config.options('commands')
            self.ready = True
コード例 #49
0
ファイル: utils.py プロジェクト: doigal/dot3k
 def __init__(self, lcd):
   self.lcd = lcd
   self.contrast = 30
   MenuOption.__init__(self)
コード例 #50
0
ファイル: status.py プロジェクト: dan-wells/pi-display
 def __init__(self):
     MenuOption.__init__(self)
     self.uptime_pat = re.compile(
         'up( (?P<days>\d+) days?,)?\s+((?P<hours>\d+):)?(?P<mins>\d+)( min)?,'
     )
コード例 #51
0
        def __init__(self):
            MenuOption.__init__(self)
            self._setup = False
            self._icons = {
                'ICON_PLAY': {
                    'index':
                    1,
                    'bmp': [
                        0b10000, 0b11000, 0b11100, 0b11110, 0b11100, 0b11000,
                        0b10000, 0b00000
                    ]
                },
                'ICON_PAUSE': {
                    'index':
                    2,
                    'bmp': [
                        0b00000, 0b11011, 0b11011, 0b11011, 0b11011, 0b11011,
                        0b11011, 0b00000
                    ]
                },
                'ICON_STOP': {
                    'index':
                    3,
                    'bmp': [
                        0b00000, 0b11111, 0b11111, 0b11111, 0b11111, 0b11111,
                        0b11111, 0b00000
                    ]
                },
                'ICON_REPEAT': {
                    'index':
                    4,
                    'bmp': [
                        0b00010, 0b01111, 0b10010, 0b10000, 0b00001, 0b01001,
                        0b11110, 0b01000
                    ]
                },
                'ICON_SHUFFLE': {
                    'index':
                    5,
                    'bmp': [
                        0b00000, 0b00000, 0b11011, 0b00100, 0b00100, 0b11011,
                        0b00000, 0b00000
                    ]
                }
            }
            self._animations = {
                'ANIM_PAUSE': {
                    'index':
                    7,
                    'frames': [
                        self._icons['ICON_PAUSE']['bmp'],
                        [0, 0, 0, 0, 0, 0, 0, 0]
                    ],
                    'fps':
                    2
                }
            }
            """ :var MPDClient """
            self.mpd_status_reader = None
            """ :var MPDClient """
            self.mpd_controller = None

            # self.mpd = None
            self.mpd_status = None

            self.volume = 100
            self.volume_pressed = time() - 5

            self._reconnect()
コード例 #52
0
 def __init__(self, backlight):
     self.backlight = backlight
     self.r = 255
     self.g = 255
     self.b = 255
     MenuOption.__init__(self)
コード例 #53
0
ファイル: LightsMenu.py プロジェクト: Meltz014/rpifortrippyt
 def setup(self, config):
     MenuOption.setup(self, config)
     self.curr_idx = 0
     self.curr_val = self.lights_control._schedule[self.curr_idx]
コード例 #54
0
ファイル: graph.py プロジェクト: terrorizer1980/displayotron
 def __init__(self, backlight=None):
     self.backlight = backlight
     self.cpu_samples = [0, 0, 0, 0, 0]
     self.cpu_avg = 0
     self.last = self.millis()
     MenuOption.__init__(self)
コード例 #55
0
 def __init__(self):
     MenuOption.__init__(self)
コード例 #56
0
    def __init__(self, backlight):
        self.backlight = backlight

        MenuOption.__init__(self)
コード例 #57
0
 def __init__(self):
     self.cpu_samples = [0, 0, 0, 0, 0]
     self.last = self.millis()
     MenuOption.__init__(self)
コード例 #58
0
ファイル: stocks.py プロジェクト: sandyjmacdonald/dot3k
 def setup(self, config):
     MenuOption.setup(self, config)
     self.load_options()
コード例 #59
0
ファイル: graph.py プロジェクト: terrorizer1980/displayotron
 def __init__(self):
     self.last = self.millis()
     MenuOption.__init__(self)