Skip to content

Commit

Permalink
Added radio variant detection to OpenGD77Interface. Addresses #394.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed May 24, 2024
2 parents 8485797 + 03ec21e commit 9cd0dfc
Show file tree
Hide file tree
Showing 417 changed files with 27,106 additions and 4,125 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: unittest-linux-gcc

on:
push:
branches: [ "master" ]
branches: [ "master", "devel" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "devel" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0.0)
project(qdmr VERSION 0.11.3)
project(qdmr VERSION 0.12.0)

set(RELEASE_SUFFIX "")

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Currently, there are only few radios that are supported

* Open GD77 firmware (since version 0.4.0)
* Radioddity GD77 (since version 0.8.1)
* Radioddity GD73 (since version 0.12.0)
* Baofeng/Radioddity RD-5R & RD-5R+ (since version 0.2.0)
* TYT MD-390 / Retevis RT8 (since version 0.9.0)
* TYT MD-UV380 (since version 0.9.0)
Expand All @@ -27,6 +28,7 @@ Currently, there are only few radios that are supported
* Anytone AT-D878UVII (since version 0.8.0)
* Anytone AT-D578UV (since version 0.8.0)
* BTECH DM-1701 / Retevis RT84 (since version 0.10.0)
* BTECH BF-1801A6 (since version 0.12.0)
* BTECH DMR-6x2 (since version 0.11.0)

A more [detailed list](https://dm3mat.darc.de/qdmr/#dev) is also available.
Expand All @@ -42,7 +44,7 @@ A more [detailed list](https://dm3mat.darc.de/qdmr/#dev) is also available.
<img src="https://repology.org/badge/vertical-allrepos/qdmr.svg" alt="Packaging status" align="right">
</a>

* **[Version 0.11.2](https://github.com/hmatuschek/qdmr/releases/tag/v0.11.2)** -- Added proper support for BTech DMR-6X2UV, some bugfixes.
* **[Version 0.11.3](https://github.com/hmatuschek/qdmr/releases/tag/v0.11.3)** -- Added proper support for BTech DMR-6X2UV, device specific settings for AnyTone devices, some bugfixes.
* **[Version 0.10.4](https://github.com/hmatuschek/qdmr/releases/tag/v0.10.4)** -- Added support for BTech DM1701, some bugfixes.
* **[Version 0.9.3](https://github.com/hmatuschek/qdmr/releases/tag/v0.9.3)** -- Reworked core library, added support for TyT MD-2017/Retevis RT82, TyT MD-390/Retevis RT8 & TyT MD-UV380.
* **[Version 0.8.1](https://github.com/hmatuschek/qdmr/releases/tag/v0.8.1)** -- Fixed Radioddity GD-77 support (callsign db still buggy).
Expand Down
12 changes: 8 additions & 4 deletions cli/autodetect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ autoDetect(QCommandLineParser &parser, QCoreApplication &app, const ErrorStack &
logDebug() << "Autodetect radios.";

QList<USBDeviceDescriptor> interfaces = USBDeviceDescriptor::detect();
if (interfaces.isEmpty())
interfaces = USBDeviceDescriptor::detect(false);

if (interfaces.isEmpty()) {
errMsg(err) << "No matching USB devices are found. Check connection?";
return nullptr;
}
logDebug() << "Found " << interfaces.count() << " device(s):";

logInfo() << "Found " << interfaces.count() << " device(s):";
foreach (USBDeviceDescriptor d, interfaces) {
logDebug() << " " << d.description() << ".";
logInfo() << " " << d.description() << ".";
}

USBDeviceDescriptor device;
Expand Down Expand Up @@ -98,13 +102,13 @@ autoDetect(QCommandLineParser &parser, QCoreApplication &app, const ErrorStack &
return nullptr;
}
return rad;
} else if (! device.isIdentifiable()) {
} else if (! device.isSave()) {
// Collect all radio keys for the device
QStringList radios;
foreach (RadioInfo info, RadioInfo::allRadios(device)) {
radios.append(info.key());
}
errMsg(err) << "It is not possible to identify the radio connected to the device '"
errMsg(err) << "It is not save or possible to identify the radio connected to the device '"
<< device.deviceHandle() << ". You have to specify which radio to use using "
<< "the --radio option. Possible radios for this device are "
<< radios.join(", ") << ".";
Expand Down
Loading

0 comments on commit 9cd0dfc

Please sign in to comment.