1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

SerialDV: corrected cmake find module and improved main window error messages for SerialDV support

This commit is contained in:
f4exb 2019-01-14 23:41:24 +01:00
parent cdfc72a859
commit 69b8aaa482
3 changed files with 34 additions and 22 deletions

View File

@ -10,7 +10,7 @@ find_path(LIBSERIALDV_INCLUDE_DIR
set(LIBSERIAL_NAMES ${LIBSERIAL_NAMES} serialdv libserialdv)
find_library(LIBSERIALDV_LIBRARY
NAMES ${LIBSERIALDV_NAMES}
NAMES serialdv
PATHS ${SERIALDV_DIR}/lib
/usr/lib
/usr/local/lib

View File

@ -255,8 +255,11 @@ if (LIBSERIALDV_FOUND)
dsp/dvserialworker.h
dsp/dvserialengine.h
)
message(STATUS "Will have SerialDV support")
add_definitions(-DDSD_USE_SERIALDV)
include_directories(${LIBSERIALDV_INCLUDE_DIR})
else(LIBSERIALDV_FOUND)
message(STATUS "No SerialDV support")
endif(LIBSERIALDV_FOUND)
if (BUILD_DEBIAN)

View File

@ -1448,6 +1448,8 @@ void MainWindow::on_action_DV_Serial_triggered(bool checked)
m_dspEngine->setDVSerialSupport(checked);
if (checked)
{
if (m_dspEngine->hasDVSerialSupport())
{
std::vector<std::string> deviceNames;
m_dspEngine->getDVSerialNames(deviceNames);
@ -1455,6 +1457,7 @@ void MainWindow::on_action_DV_Serial_triggered(bool checked)
if (deviceNames.size() == 0)
{
QMessageBox::information(this, tr("Message"), tr("No DV serial devices found"));
qDebug("MainWindow::on_action_DV_Serial_triggered: No DV serial devices found");
}
else
{
@ -1474,6 +1477,12 @@ void MainWindow::on_action_DV_Serial_triggered(bool checked)
QMessageBox::information(this, tr("Message"), tr(deviceNamesStr.c_str()));
}
}
else
{
QMessageBox::information(this, tr("Message"), tr("No DV serial support"));
qDebug("MainWindow::on_action_DV_Serial_triggered: No DV serial support");
}
}
}
void MainWindow::sampleSourceChanged()