Skip to content

Commit

Permalink
Rename method for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesremuscat committed Nov 28, 2017
1 parent b925042 commit b8b6cfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/avx/devices/net/atem/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _resolveAudioInputBytes(self, inputID):
def setMultiviewerLayout(self, layout, mv=1):
mv_count = self._system_config.get('multiviewers', 0)
if mv > mv_count or mv <= 0:
raise InvalidArgumentException('Tried to set multiview {} but we have {} available'.format(mv, mv_count))
raise InvalidArgumentException('Tried to set multiviewer {} but we have {} available'.format(mv, mv_count))
if not isinstance(layout, MultiviewerLayout):
raise InvalidArgumentException('{} is not a MultiviewerLayout'.format(mv))
self._sendCommand(
Expand All @@ -34,10 +34,10 @@ def setMultiviewerLayout(self, layout, mv=1):
)

@requiresInit
def setMultiviewWindowSource(self, window, source, mv=1):
def setMultiviewerWindowSource(self, window, source, mv=1):
mv_count = self._system_config.get('multiviewers', 0)
if window < 0 or window > 9:
raise InvalidArgumentException('Multiview window should be in range 0-9 but got {}', window)
raise InvalidArgumentException('Multiviewer window should be in range 0-9 but got {}', window)
if mv <= mv_count:
self._sendCommand(
'CMvI',
Expand All @@ -47,7 +47,7 @@ def setMultiviewWindowSource(self, window, source, mv=1):
] + self._resolveInputBytes(source)
)
else:
raise InvalidArgumentException('Tried to set multiview {} but we have {} available'.format(mv, mv_count))
raise InvalidArgumentException('Tried to set multiviewer {} but we have {} available'.format(mv, mv_count))

@requiresInit
@assertTopology('aux_busses', 'auxChannel')
Expand Down
4 changes: 2 additions & 2 deletions src/avx/devices/net/atem/tests/TestATEMSender.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ def testSetMultiviewerLayout(self):
self.atem.setMultiviewerLayout(MultiviewerLayout.TOP, 7)

def testSetMultiviewerInput(self):
self.atem.setMultiviewWindowSource(3, VideoSource.COLOUR_BARS)
self.atem.setMultiviewerWindowSource(3, VideoSource.COLOUR_BARS)
self.assert_sent_packet(
'CMvI',
[0, 3, 0x03, 0xE8]
)
self.atem._socket.reset_mock()

try:
self.atem.setMultiviewWindowSource(22, VideoSource.AUX_1)
self.atem.setMultiviewerWindowSource(22, VideoSource.AUX_1)
self.fail("Should have thrown an exception")
except InvalidArgumentException:
pass
Expand Down

0 comments on commit b8b6cfb

Please sign in to comment.