Skip to content

Commit

Permalink
Added M17 contact type.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed Sep 17, 2022
1 parent 3c912c7 commit c38ab8b
Show file tree
Hide file tree
Showing 16 changed files with 134 additions and 400 deletions.
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ELSE (APPLE)
ENDIF(APPLE)

SET(libdmrconf_SOURCES
utils.cc crc32.cc signaling.cc codeplugcontext.cc addressmap.cc radiointerface.cc errorstack.cc
utils.cc crc32.cc signaling.cc addressmap.cc radiointerface.cc errorstack.cc
radio.cc ${hid_SOURCES} dfu_libusb.cc usbserial.cc radioinfo.cc usbdevice.cc radiolimits.cc
csvreader.cc dfufile.cc userdatabase.cc logger.cc
configobject.cc configreference.cc config.cc radiosettings.cc contact.cc rxgrouplist.cc
Expand Down Expand Up @@ -56,7 +56,7 @@ SET(libdmrconf_MOC_HEADERS
SET(libdmrconf_HEADERS libdmrconf.hh radiointerface.hh radioinfo.hh usbdevice.hh
gd77_filereader.hh rd5r_filereader.hh uv390_filereader.hh md2017_filereader.hh
md390_filereader.hh
utils.hh crc32.hh signaling.hh codeplugcontext.hh addressmap.hh errorstack.hh)
utils.hh crc32.hh signaling.hh addressmap.hh errorstack.hh)


configure_file(config.h.in ${PROJECT_BINARY_DIR}/lib/config.h)
Expand Down
3 changes: 0 additions & 3 deletions lib/anytone_filereader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <QFile>
#include "config.hh"
#include "codeplugcontext.hh"


/** This class implements a reader of AnyTone codeplug files.
Expand Down Expand Up @@ -72,8 +71,6 @@ public:
static bool read(const QString &filename, Config *config, QString &message);

protected:
/** Offset-element map. */
CodeplugContext _context;
/** Pointer to the start. */
const uint8_t * const _start;
/** Pointer to the entire data. */
Expand Down
15 changes: 13 additions & 2 deletions lib/channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ FMChannel::serialize(const Context &context, const ErrorStack &err) {
return node;

YAML::Node type;
type["analog"] = node;
type["fm"] = node;
return type;
}

Expand Down Expand Up @@ -880,7 +880,7 @@ DMRChannel::serialize(const Context &context, const ErrorStack &err) {
return node;

YAML::Node type;
type["digital"] = node;
type["dmr"] = node;
return type;
}

Expand Down Expand Up @@ -975,6 +975,7 @@ ChannelList::findFMChannelByTxFreq(double freq) const {

ConfigItem *
ChannelList::allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err) {
static bool digitalDepricated = true, analogDeprecated = true;
Q_UNUSED(ctx)
if (! node)
return nullptr;
Expand All @@ -987,8 +988,18 @@ ChannelList::allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, con

QString type = QString::fromStdString(node.begin()->first.as<std::string>());
if (("digital" == type) || ("dmr" == type)) {
if (("digital" == type) && digitalDepricated) {
logWarn() << node.Mark().line << ":" << node.Mark().column
<< ": Using 'digital' for DMR channels is deprecated. Please use 'dmr' instead.";
digitalDepricated = false;
}
return new DMRChannel();
} else if (("analog" == type) || ("fm"==type)) {
if (("analog" == type) && analogDeprecated) {
logWarn() << node.Mark().line << ":" << node.Mark().column
<< ": Using 'analog' for FM channels is deprecated. Please use 'fm' instead.";
analogDeprecated = false;
}
return new FMChannel();
}

Expand Down
264 changes: 0 additions & 264 deletions lib/codeplugcontext.cc

This file was deleted.

Loading

0 comments on commit c38ab8b

Please sign in to comment.