Skip to content

Commit

Permalink
Fix Skydimo - populate outbut buffer (#1802)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey authored Nov 17, 2024
1 parent 27f74af commit bc1bfbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libsrc/leddevice/dev_serial/LedDeviceSkydimo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ int LedDeviceSkydimo::write(const std::vector<ColorRgb> & ledValues)
return 0;
}

assert(HEADER_SIZE + ledValues.size() * sizeof(ColorRgb) <= _ledBuffer.size());

memcpy(HEADER_SIZE + _ledBuffer.data(), ledValues.data(), ledValues.size() * sizeof(ColorRgb));

return writeBytes(_bufferLength, _ledBuffer.data());
}

0 comments on commit bc1bfbc

Please sign in to comment.