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

pull/278/head
f4exb 2019-01-14 23:41:24 +01:00
rodzic cdfc72a859
commit 69b8aaa482
3 zmienionych plików z 34 dodań i 22 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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)

Wyświetl plik

@ -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()