Skip to content

Commit

Permalink
[dmx] Fix a wrong shift offset in dmx usb pro protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Nov 8, 2023
1 parent c157226 commit e77c0e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ossia/protocols/artnet/dmxusbpro_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ void dmxusbpro_protocol::update_function()
constexpr uint32_t buffer_size = 4 + data_size + 1;

constexpr uint8_t data_size_lsb = data_size & 0x00FF;
constexpr uint8_t data_size_msb = (data_size & 0xFF00) >> 16;
constexpr uint8_t data_size_msb = (data_size & 0xFF00) >> 8;

unsigned char buf[buffer_size]{0x7E, 6, data_size_lsb, data_size_msb, 0};
unsigned char buf[buffer_size]{0x7E, 0x6, data_size_lsb, data_size_msb, 0};

for(uint32_t i = 0; i < channels; i++)
buf[5 + i] = m_buffer.data[i];
Expand Down

0 comments on commit e77c0e0

Please sign in to comment.