Exemple #1
0
/**
 * copy contents of the DmxBuffer into my local scope
 * \returns true on success
 */
bool KarateLight::SetColors(const DmxBuffer &da) {
  // make sure not to request data beyond the bounds of the universe
  unsigned int length = std::min(static_cast<int>(da.Size()),
                                 DMX_UNIVERSE_SIZE - m_dmx_offset);

  da.GetRange(m_dmx_offset, m_color_buffer, &length);
  return KarateLight::UpdateColors();
}