Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3480dbd
Fix the mute all devices test, add more set and set with data tests
peternewman Apr 17, 2016
39806ac
More RDM test work
peternewman Apr 17, 2016
c962472
Fix some Travis errors
peternewman Apr 17, 2016
867b542
Merge branch 'master' into libusb
peternewman Apr 17, 2016
b94a07e
Correct expected Nack type, as spotted by ETC
peternewman Apr 20, 2016
354117e
Tidy some check names
peternewman Apr 20, 2016
b5f318c
More test improvements
peternewman Apr 20, 2016
ac5992f
More RDM test work and standardising
peternewman Apr 20, 2016
94551ac
Actually decode PID param data, correct the flag logic
peternewman Apr 21, 2016
b93be42
Support USB Pro Mk 2 B
peternewman Apr 21, 2016
a1be315
Show port descriptions for Enttec multi-port devices
peternewman Apr 21, 2016
1791575
Actually allow the PID location to be set, untested cleanup of workin…
peternewman Apr 21, 2016
d91d40a
Fix a lint issue
peternewman Apr 21, 2016
a8166da
Fix some Flake8 issues
peternewman Apr 22, 2016
485ee0d
Fix the missed flake8 issue
peternewman Apr 23, 2016
98fdded
Add a test for the Mk II B detection
peternewman Apr 30, 2016
aedb884
Make the language check a bit stricter
peternewman Apr 30, 2016
00aba41
Fix a comment
peternewman May 7, 2016
e6ea74e
Try and fix the new cpplint errors
peternewman May 7, 2016
928076f
Fix the last lint issue
peternewman May 7, 2016
7f9acee
Merge branch 'master' of https://github.com/OpenLightingProject/ola i…
peternewman May 12, 2016
73db3b7
Fix a few more pychecker issues
peternewman May 16, 2016
f821212
Try and fix another pychecker issue
peternewman May 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions plugins/usbpro/WidgetDetectorThreadTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class WidgetDetectorThreadTest: public CppUnit::TestFixture,
CPPUNIT_TEST(testDmxterWidget);
CPPUNIT_TEST(testUsbProWidget);
CPPUNIT_TEST(testUsbProMkIIWidget);
CPPUNIT_TEST(testUsbProMkIIBWidget);
CPPUNIT_TEST(testRobeWidget);
CPPUNIT_TEST(testUltraDmxWidget);
CPPUNIT_TEST(testTimeout);
Expand All @@ -108,6 +109,7 @@ class WidgetDetectorThreadTest: public CppUnit::TestFixture,
void testDmxterWidget();
void testUsbProWidget();
void testUsbProMkIIWidget();
void testUsbProMkIIBWidget();
void testRobeWidget();
void testUltraDmxWidget();
void testTimeout();
Expand Down Expand Up @@ -410,6 +412,51 @@ void WidgetDetectorThreadTest::testUsbProMkIIWidget() {
}


/**
* Check that we can locate a Usb Pro MK II B widget
*/
void WidgetDetectorThreadTest::testUsbProMkIIBWidget() {
const uint8_t serial_data[] = {0x78, 0x56, 0x34, 0x12};
uint8_t get_params_request[] = {0, 0};
uint8_t get_params_response[] = {4, 1, 9, 1, 1};
m_endpoint->AddExpectedUsbProMessage(BaseUsbProWidget::MANUFACTURER_LABEL,
NULL, 0);
m_endpoint->AddExpectedUsbProMessage(BaseUsbProWidget::DEVICE_LABEL,
NULL, 0);
m_endpoint->AddExpectedUsbProDataAndReturn(
BaseUsbProWidget::SERIAL_LABEL, NULL, 0,
BaseUsbProWidget::SERIAL_LABEL, serial_data, sizeof(serial_data));

m_endpoint->AddExpectedUsbProDataAndReturn(
BaseUsbProWidget::GET_PARAMS,
&get_params_request[0],
sizeof(get_params_request),
BaseUsbProWidget::GET_PARAMS,
get_params_response,
sizeof(get_params_response));

const uint8_t hardware_version = 3;
m_endpoint->AddExpectedUsbProDataAndReturn(
BaseUsbProWidget::HARDWARE_VERSION_LABEL, NULL, 0,
BaseUsbProWidget::HARDWARE_VERSION_LABEL,
&hardware_version, sizeof(hardware_version));

// expect the unlock message and then the port enable
const uint8_t unlock_key[] = {0xd7, 0xb2, 0x11, 0x0d};
m_endpoint->AddExpectedUsbProMessage(USB_PRO_MKII_API_LABEL, unlock_key,
sizeof(unlock_key));
const uint8_t port_enable[] = {1, 1};
m_endpoint->AddExpectedUsbProMessage(SET_PORT_ASSIGNMENTS, port_enable,
sizeof(port_enable));

m_expect_dual_port_enttec_widget = true;
m_thread->Start();
m_thread->WaitUntilRunning();
m_ss.Run();
OLA_ASSERT_EQ(ENTTEC, m_received_widget_type);
}


/**
* Check that we can locate a Robe widget.
*/
Expand Down
4 changes: 2 additions & 2 deletions python/examples/ola_universe_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def Universes(status, universes):
for uni in universes:
print('Universe %d' % uni.id)
print(' - Name: %s' % uni.name)
print(' - Merge mode: %s' % (
('LTP' if uni.merge_mode == Universe.LTP else 'HTP')))
print(' - Merge mode: %s' %
('LTP' if uni.merge_mode == Universe.LTP else 'HTP'))

if len(uni.input_ports) > 0:
print(' - Input ports:')
Expand Down
5 changes: 3 additions & 2 deletions python/ola/PidStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,9 @@ def _VerifyStructure(self):
variable_sized_atoms.append(atom)

if len(variable_sized_atoms) > 1:
raise PidStore('More than one variable size field in %s: %s' % (
self.name, variable_sized_atoms))
raise PidStructureException(
'More than one variable size field in %s: %s' %
(self.name, variable_sized_atoms))

if not variable_sized_atoms:
# The group is of a fixed size, this means we don't care how many times
Expand Down
4 changes: 4 additions & 0 deletions tools/rdm/ResponderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ def __init__(self,
def uid(self):
return self._uid

def PidSupported(self):
# By default all PIDs are supported, overridden in subclasses
return True

def SleepAfterBroadcastSet(self):
if self._broadcast_write_delay_s:
self.LogDebug('Sleeping after broadcast...')
Expand Down
Loading