1
0
Fork 0

also set the DMX device class when changing operating mode

This commit is contained in:
Kevin Matz 2023-04-17 08:17:31 -04:00
parent e0fb4ccbb3
commit 4d797f2c1c
1 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,7 @@ void Widget::setModeController()
sendDmx();
std::scoped_lock lock(mtx_metadata_);
token_data_changed_ = onDataChange([this](DMX::Universe*){sendDmx();});
device_class_ = DMX::CONTROLLER;
}
@ -124,6 +125,10 @@ void Widget::setModeBridge(Pro::DMX_RX_MODE mode)
std::scoped_lock lock(mtx_metadata_);
token_data_changed_ = nullptr;
rx_update_mode_ = mode;
if (featureRDM())
device_class_ = DMX::RESPONDER;
else
device_class_ = DMX::RECEIVER;
}
auto msg = std::make_shared<Pro::MsgRecieveDMXOnChange>();
msg->mode = mode;