Changeset 80
- Timestamp:
- 07/02/08 00:52:42 (5 months ago)
- Files:
-
- fizzjik/fizzjik/io/avr3085.py (modified) (7 diffs)
- fizzjik/fizzjik/io/basic.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fizzjik/fizzjik/io/avr3085.py
r77 r80 11 11 from fizzjik.event import Event 12 12 from fizzjik.interfaces import IController, implements 13 from fizzjik.config import public_method 13 14 14 15 class AvrEvent(Event): … … 78 79 hub.addObserver(AvrPowerEvent, self._onPowerChange) 79 80 81 @public_method 80 82 def sendCommand(self, cmd, hold=0.2): 81 83 d = self._cmdLock.acquire() … … 89 91 90 92 # High-level commands 93 @public_method 91 94 def setVolume(self, zone, volume): 92 95 cmd_prefix = {'1': 'MV', '2': 'Z2', '3': 'Z1'} … … 94 97 self.sendCommand(cmd) 95 98 99 @public_method 96 100 def setSource(self, zone, source): 97 101 cmd_prefix = {'1': 'SI', '2': 'Z2', '3': 'Z1'} … … 99 103 self.sendCommand(cmd, hold=2) 100 104 105 @public_method 101 106 def setPower(self, zone, status): 102 107 cmd_prefix = {'1': 'ZM', '2': 'Z2', '3': 'Z1'} … … 104 109 self.sendCommand(cmd, hold=2) 105 110 111 @public_method 106 112 def volumeUp(self, zone): 107 113 cmd_prefix = {'1': 'MV', '2': 'Z2', '3': 'Z1'} … … 109 115 self.sendCommand(cmd) 110 116 117 @public_method 111 118 def volumeDown(self, zone): 112 119 cmd_prefix = {'1': 'MV', '2': 'Z2', '3': 'Z1'} fizzjik/fizzjik/io/basic.py
r73 r80 9 9 from fizzjik.event import Event 10 10 from fizzjik.config import ConfigurableTCPServer, ConfigurableService, \ 11 if_config 11 if_config, public_method 12 12 13 13 … … 41 41 self.parent.observe(evt) 42 42 43 @public_method 44 def receiveLine(self, line): 45 self.observe(self.builder(line.strip())) 43 46 44 47 class Input(ConfigurableService):
