1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 00:14:49 -04:00

Web API: /sdrangel/deviceset/{deviceSetIndex}/channel (POST)

This commit is contained in:
f4exb
2017-12-11 01:18:10 +01:00
parent 2dd82e9eca
commit 0e3b558141
8 changed files with 300 additions and 1 deletions
+11
View File
@@ -68,6 +68,7 @@ MESSAGE_CLASS_DEFINITION(MainWindow::MsgDeletePreset, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgAddDeviceSet, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgRemoveLastDeviceSet, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgSetDevice, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgAddChannel, Message)
MainWindow *MainWindow::m_instance = 0;
@@ -744,6 +745,16 @@ bool MainWindow::handleMessage(const Message& cmd)
return true;
}
else if (MsgAddChannel::match(cmd))
{
MsgAddChannel& notif = (MsgAddChannel&) cmd;
ui->tabInputsSelect->setCurrentIndex(notif.getDeviceSetIndex());
DeviceUISet *deviceUI = m_deviceUIs[notif.getDeviceSetIndex()];
deviceUI->m_samplingDeviceControl->getChannelSelector()->setCurrentIndex(notif.getChannelRegistrationIndex());
on_channel_addClicked(true);
return true;
}
return false;
}