1
0
Fork 0

prefer the block setting code path

This commit is contained in:
Kevin Matz 2022-12-06 18:04:19 -05:00
parent 97ef3d5078
commit f496b89e44
3 changed files with 1 additions and 31 deletions

View File

@ -209,11 +209,7 @@ void QSacnUniverse::setSyncAddress(uint16_t a)
*/
void QSacnUniverse::setValue (const uint16_t addr, const uint8_t level)
{
if (!isEditable())
return;
universe_->sACN::Universe::setValue(addr, level);
emit dataChanged();
setValue(addr, 1, &level);
}

View File

@ -233,31 +233,6 @@ uint16_t Universe::activeSlots()
}
void Universe::setValue(const uint16_t address, const uint8_t value)
{
if (!isEditable())
return;
// address valid?
if (address < 1 || address > null_start_data.size())
return;
// set active_data_slots to at least this address
if (address >= active_data_slots_)
active_data_slots_ = address + 1; // + start code
// data not changed!
if (slot(address) == value)
return;
// set the value
DMX::Universe::setValue(address, value);
// request sACN message to be sent
tx_request_.notify_all();
}
void Universe::setValue (const uint16_t start, const uint16_t footprint,
const uint8_t* data)
{

View File

@ -71,7 +71,6 @@ public:
virtual std::shared_ptr<void> onSourceListChange(std::function<void()>);
// DMX::Universe overrides
virtual void setValue (const uint16_t address, const uint8_t value) override;
virtual void setValue (const uint16_t start, const uint16_t footprint,
const uint8_t* data) override;
virtual void setStatus(uint8_t) override;