Skip to content

Commit

Permalink
controllers/controllerengine: Re-enable DEBUG_ASSERTs on --controller…
Browse files Browse the repository at this point in the history
…Debug
  • Loading branch information
Holzhaus committed Aug 30, 2020
1 parent 423b99c commit cb4e23c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/controllers/controllerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ void ControllerEngine::setValue(QString group, QString name, double newValue) {

if (coScript) {
ControlObject* pControl = ControlObject::getControl(
coScript->getKey(), ControlFlag::AllowMissingOrInvalid);
coScript->getKey(), ControllerDebug::enabled() ? ControlFlag::None : ControlFlag::AllowMissingOrInvalid);
if (pControl && !m_st.ignore(pControl, coScript->getParameterForValue(newValue))) {
coScript->slotSet(newValue);
}
Expand Down Expand Up @@ -720,7 +720,7 @@ void ControllerEngine::setParameter(QString group, QString name, double newParam

if (coScript) {
ControlObject* pControl = ControlObject::getControl(
coScript->getKey(), ControlFlag::AllowMissingOrInvalid);
coScript->getKey(), ControllerDebug::enabled() ? ControlFlag::None : ControlFlag::AllowMissingOrInvalid);
if (pControl && !m_st.ignore(pControl, newParameter)) {
coScript->setParameter(newParameter);
}
Expand Down Expand Up @@ -1448,7 +1448,7 @@ bool ControllerEngine::isScratching(int deck) {
-------- ------------------------------------------------------ */
void ControllerEngine::softTakeover(QString group, QString name, bool set) {
ConfigKey key = ConfigKey(group, name);
ControlObject* pControl = ControlObject::getControl(key, ControlFlag::AllowMissingOrInvalid);
ControlObject* pControl = ControlObject::getControl(key, ControllerDebug::enabled() ? ControlFlag::None : ControlFlag::AllowMissingOrInvalid);
if (!pControl) {
qWarning() << "Failed to" << (set ? "enable" : "disable")
<< "softTakeover for invalid control" << key;
Expand All @@ -1473,7 +1473,7 @@ void ControllerEngine::softTakeover(QString group, QString name, bool set) {
void ControllerEngine::softTakeoverIgnoreNextValue(
QString group, const QString name) {
ConfigKey key = ConfigKey(group, name);
ControlObject* pControl = ControlObject::getControl(key, ControlFlag::AllowMissingOrInvalid);
ControlObject* pControl = ControlObject::getControl(key, ControllerDebug::enabled() ? ControlFlag::None : ControlFlag::AllowMissingOrInvalid);
if (!pControl) {
qWarning() << "Failed to call softTakeoverIgnoreNextValue for invalid control" << key;
return;
Expand Down

0 comments on commit cb4e23c

Please sign in to comment.