Skip to content

Commit

Permalink
Implemented encoding, addresses #188.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmatuschek committed Oct 14, 2023
1 parent bfe0759 commit 7f21700
Show file tree
Hide file tree
Showing 4 changed files with 533 additions and 10 deletions.
5 changes: 5 additions & 0 deletions cli/encodecodeplug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "config.hh"
#include "radioinfo.hh"
#include "rd5r_codeplug.hh"
#include "gd73_codeplug.hh"
#include "gd77_codeplug.hh"
#include "opengd77_codeplug.hh"
#include "openrtx_codeplug.hh"
Expand Down Expand Up @@ -126,6 +127,10 @@ int encodeCodeplug(QCommandLineParser &parser, QCoreApplication &app) {
if (! encode<RD5RCodeplug>(config, flags, parser))
return -1;
break;
case RadioInfo::GD73:
if (! encode<GD73Codeplug>(config, flags, parser))
return -1;
break;
case RadioInfo::GD77:
if (! encode<GD77Codeplug>(config, flags, parser))
return -1;
Expand Down
14 changes: 12 additions & 2 deletions lib/frequency.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,24 @@ public:

/** Assignment. */
Frequency &operator = (const Frequency &other);

inline bool operator< (const Frequency &other) const { ///< Comparison.
return _frequency < other._frequency;
}
inline bool operator <=(const Frequency &other) const { ///< Comparison.
return _frequency <= other._frequency;
}
inline bool operator== (const Frequency &other) const { ///< Comparison.
return _frequency == other._frequency;
}
inline bool operator != (const Frequency &other) const { ///< Comparison.
return _frequency != other._frequency;
}
inline bool operator< (const Frequency &other) const { ///< Comparison.
return _frequency < other._frequency;
inline bool operator> (const Frequency &other) const { ///< Comparison.
return _frequency > other._frequency;
}
inline bool operator >=(const Frequency &other) const { ///< Comparison.
return _frequency >= other._frequency;
}

/** Format the frequency. */
Expand Down
Loading

0 comments on commit 7f21700

Please sign in to comment.