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

Web API: /sdrangel/deviceset/{index}/device (PUT) implementation

This commit is contained in:
f4exb
2017-11-27 08:14:07 +01:00
parent c5a19e261c
commit 3bfdd49b4f
8 changed files with 192 additions and 3 deletions
+16
View File
@@ -67,6 +67,7 @@ MESSAGE_CLASS_DEFINITION(MainWindow::MsgSavePreset, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgDeletePreset, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgAddDeviceSet, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgRemoveLastDeviceSet, Message)
MESSAGE_CLASS_DEFINITION(MainWindow::MsgSetDevice, Message)
MainWindow *MainWindow::m_instance = 0;
@@ -728,6 +729,21 @@ bool MainWindow::handleMessage(const Message& cmd)
return true;
}
else if (MsgSetDevice::match(cmd))
{
MsgSetDevice& notif = (MsgSetDevice&) cmd;
ui->tabInputsSelect->setCurrentIndex(notif.getDeviceSetIndex());
DeviceUISet *deviceUI = m_deviceUIs[notif.getDeviceSetIndex()];
deviceUI->m_samplingDeviceControl->setSelectedDeviceIndex(notif.getDeviceIndex());
if (notif.isTx()) {
on_sampleSink_changed();
} else {
on_sampleSource_changed();
}
return true;
}
return false;
}