added "Thru/Masterchn - Dump" function

master
Yohann Dedy 2016-09-05 23:53:01 +02:00
parent 2ae4eb1509
commit 029f719b3b
4 changed files with 19 additions and 7 deletions

View File

@ -110,6 +110,23 @@ void mainWindow::openSettingsWindow()
_settingsWindow->show();
}
void mainWindow::updateDeviceConfig(){
if(!_midiOut->isPortOpen()) return;
std::bitset<3> *thru = _settingsWindow->_thruBitset;
int mastChn = _settingsWindow->_masterChannelSpinBox->value() - 1;
std::vector<unsigned char> rawRequest;
rawRequest = _prefixPocketC;
rawRequest.push_back(0x50);
rawRequest.push_back(thru->to_ulong());
rawRequest.push_back(mastChn);
rawRequest.push_back(0xF7);
_midiOut->sendRawMessage(rawRequest);
}
void mainWindow::openMidiPorts(){
_midiIn->closePort();
_midiOut->closePort();

View File

@ -58,7 +58,7 @@ signals:
public slots:
void onMidiMessageReceive(QMidiMessage* message);
void openSettingsWindow();
//void updateDeviceConfig(std::bitset<3> thru, int mastChn);
void updateDeviceConfig();
//void updatePresetSettings(std::vector<unsigned int>* presetSettings);
private slots:
void openMidiPorts();

View File

@ -58,6 +58,7 @@ settingsWindow::settingsWindow(QWidget *parent) :
setConfigButton->setText("Set configuration");
connect(getConfigButton, SIGNAL(clicked(bool)),parent,SLOT(sendThruMasterChnRequest()));
connect(setConfigButton, SIGNAL(clicked(bool)),parent, SLOT(updateDeviceConfig()));
QVBoxLayout *vbox = new QVBoxLayout;
vbox->addWidget(_channelThruCheckBox);
@ -105,8 +106,3 @@ void settingsWindow::updateConfig(QMidiMessage* message){
_sysexThruCheckBox->setChecked(thruVal.test(1));
_realtimeThruCheckBox->setChecked(thruVal.test(2));
}
void settingsWindow::onSetConfig(){
}

View File

@ -41,7 +41,6 @@ signals:
public slots:
void onThruCheckboxChange();
void updateConfig(QMidiMessage* message);
void onSetConfig();
};
#endif // SETTINGSWINDOW_H