Skip to content

Commit

Permalink
AutoDJ debug hotkey / GUI update
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Sep 11, 2023
1 parent 291669c commit 34be3fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/library/autodj/autodjprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::skipNext() {

AutoDJProcessor::AutoDJError AutoDJProcessor::toggleAutoDJ(bool enable) {
if (enable) { // Enable Auto DJ
qWarning() << " .";
qWarning() << " ADJproc toggle ADJ" << enable;
DeckAttributes* pLeftDeck = getLeftDeck();
DeckAttributes* pRightDeck = getRightDeck();
if (!pLeftDeck || !pRightDeck) {
Expand Down Expand Up @@ -585,6 +587,8 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::toggleAutoDJ(bool enable) {
}

void AutoDJProcessor::controlEnableChangeRequest(double value) {
qWarning() << " .";
qWarning() << " ADJ change request" << value;
toggleAutoDJ(value > 0.0);
}

Expand Down
4 changes: 4 additions & 0 deletions src/library/autodj/dlgautodj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ void DlgAutoDJ::transitionSliderChanged(int value) {
}

void DlgAutoDJ::autoDJStateChanged(AutoDJProcessor::AutoDJState state) {
qWarning() << " .";
qWarning() << " ADJ state changed:"
<< QString(state == AutoDJProcessor::ADJ_DISABLED ? "0" : "1");
if (state == AutoDJProcessor::ADJ_DISABLED) {
pushButtonAutoDJ->setChecked(false);
pushButtonAutoDJ->setToolTip(m_enableBtnTooltip);
Expand All @@ -325,6 +328,7 @@ void DlgAutoDJ::autoDJStateChanged(AutoDJProcessor::AutoDJState state) {
pushButtonFadeNow->setEnabled(false);
pushButtonSkipNext->setEnabled(false);
} else {
qWarning() << " --> else (On)";
// No matter the mode, you can always disable once it is enabled.
pushButtonAutoDJ->setChecked(true);
pushButtonAutoDJ->setToolTip(m_disableBtnTooltip);
Expand Down

0 comments on commit 34be3fd

Please sign in to comment.