Skip to content

Commit

Permalink
convert a few lost ARGTYPE_BOOLs to OptionBool.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 committed Oct 16, 2024
1 parent 842ed67 commit 7d11207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
20 changes: 1 addition & 19 deletions nmea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ sentence is truncated - and missing part of the line, including the checksum.
*/

#define MYNAME "nmea"
#warning "fix me"
#define CHECK_BOOL(a)

/*
* Slightly different than the Magellan checksum fn.
Expand Down Expand Up @@ -227,12 +225,6 @@ NmeaFormat::rd_init(const QString& fname)
datum = kDatumWGS84;
had_checksum = false;

CHECK_BOOL(opt_gprmc);
CHECK_BOOL(opt_gpgga);
CHECK_BOOL(opt_gpvtg);
CHECK_BOOL(opt_gpgsa);
CHECK_BOOL(opt_gisteq);

pcmpt_head.clear();

if (getposnarg) {
Expand Down Expand Up @@ -284,15 +276,7 @@ NmeaFormat::rd_deinit()
void
NmeaFormat::wr_init(const QString& fname)
{
CHECK_BOOL(opt_gprmc);
CHECK_BOOL(opt_gpgga);
CHECK_BOOL(opt_gpvtg);
CHECK_BOOL(opt_gpgsa);
CHECK_BOOL(opt_gisteq);

append_output = strtod(opt_append, nullptr);

file_out = gbfopen(fname, append_output ? "a+" : "w+", MYNAME);
file_out = gbfopen(fname, opt_append ? "a+" : "w+", MYNAME);

sleepms = -1;
if (opt_sleep) {
Expand All @@ -307,7 +291,6 @@ NmeaFormat::wr_init(const QString& fname)
mkshort_handle->set_length(xstrtoi(snlenopt, nullptr, 10));

if (opt_gisteq) {
#warning "fix me"
opt_gpgga.reset();
opt_gpvtg.reset();
opt_gpgsa.reset();
Expand Down Expand Up @@ -462,7 +445,6 @@ NmeaFormat::gpgga_parse(const QString& ibuf)
* as serial units will often spit a remembered position up and
* that is more comfortable than nothing at all...
*/
CHECK_BOOL(opt_ignorefix);
if ((fix <= 0) && (read_mode != rm_serial || (latdeg == 0.0 && lngdeg == 0.0)) && (!opt_ignorefix)) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions nmea.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ class NmeaFormat : public Format
OptionCString getposnarg;
OptionCString opt_sleep;
OptionCString opt_baud;
OptionCString opt_append;
OptionBool opt_append;
OptionBool opt_gisteq;
OptionCString opt_ignorefix;
OptionBool opt_ignorefix;

long sleepms{};
int getposn{};
Expand Down

0 comments on commit 7d11207

Please sign in to comment.