SpeedDial and FeedBack
Posted: Tue Jul 14, 2015 2:46 pm
Hello
In the attached log with added debug lines
edit file /qlcplus/ui/src/virtualconsole/vcspeeddial.cpp
and
You can see the differences between the values of the function
VCSpeedDial :: slotInputValueChanged where it is 78ms and
VCSpeedDial :: slotDialValueChanged where it is 700ms.
This sends through the feedback values for 700ms to 78ms and instead of looping while decreasing.
Where is the value passed to the function void VCSpeedDial::slotDialValueChanged (int ms)?
In the attached log with added debug lines
edit file /qlcplus/ui/src/virtualconsole/vcspeeddial.cpp
Code: Select all
void VCSpeedDial::slotDialValueChanged(int ms)
{
qDebug() << "[VCSpeedDial::slotDialValueChanged] ms:" << ms;
const QVector <quint32> multipliers = VCSpeedDialFunction::speedMultiplierValuesTimes1000();
foreach (const VCSpeedDialFunction &speeddialfunction, m_functions)
{
Function* function = m_doc->function(speeddialfunction.functionId);
if (function != NULL)
{
if (speeddialfunction.fadeInMultiplier != VCSpeedDialFunction::None)
function->setFadeInSpeed(ms * multipliers[speeddialfunction.fadeInMultiplier] / 1000);
if (speeddialfunction.fadeOutMultiplier != VCSpeedDialFunction::None)
function->setFadeOutSpeed(ms * multipliers[speeddialfunction.fadeOutMultiplier] / 1000);
if (speeddialfunction.durationMultiplier != VCSpeedDialFunction::None)
function->setDuration(ms * multipliers[speeddialfunction.durationMultiplier] / 1000);
}
}
updateFeedback();
}
Code: Select all
void VCSpeedDial::slotInputValueChanged(quint32 universe, quint32 channel, uchar value)
{
if (isEnabled() == false)
return;
quint32 pagedCh = (page() << 16) | channel;
if (checkInputSource(universe, pagedCh, value, sender(), tapInputSourceId))
{
if (value != 0)
m_dial->tap();
}
else if (checkInputSource(universe, pagedCh, value, sender(), absoluteInputSourceId))
{
int ms = static_cast<int> (SCALE(qreal(value), qreal(0), qreal(255),
qreal(absoluteValueMin()),
qreal(absoluteValueMax())));
m_dial->setValue(ms, true);
qDebug() << "[VCSpeedDial::slotInputValueChanged()] value:" << value << ", ms:" << ms;
}
else if (checkInputSource(universe, pagedCh, value, sender(), infiniteInputSourceId))
{
if (value != 0)
m_dial->toggleInfinite();
}
}
You can see the differences between the values of the function
VCSpeedDial :: slotInputValueChanged where it is 78ms and
VCSpeedDial :: slotDialValueChanged where it is 700ms.
This sends through the feedback values for 700ms to 78ms and instead of looping while decreasing.
Where is the value passed to the function void VCSpeedDial::slotDialValueChanged (int ms)?