Skip to content

Commit

Permalink
better old gps handling and moved SECHO out of QnetTypeDefs.h
Browse files Browse the repository at this point in the history
  • Loading branch information
n7tae committed Oct 22, 2018
1 parent 32b02d6 commit 9ab25c7
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 15 deletions.
6 changes: 3 additions & 3 deletions QnetGateway.cpp
Expand Up @@ -2844,7 +2844,7 @@ void CQnetGateway::gps_send(short int rptr_idx)
printf("GPRMC=[%s]\n", band_txt[rptr_idx].gprmc);
printf("GPS id=[%s]\n",band_txt[rptr_idx].gpid);

if (validate_csum(band_txt[rptr_idx], false) || validate_csum(band_txt[rptr_idx], true))
if (validate_csum(band_txt[rptr_idx], false)) // || validate_csum(band_txt[rptr_idx], true))
return;

/* now convert GPS into APRS and send it */
Expand Down Expand Up @@ -2899,7 +2899,7 @@ void CQnetGateway::build_aprs_from_gps_and_send(short int rptr_idx)
printf("Invalid North or South indicator in latitude\n");
return;
}
if (strlen(lat_str) != 9) {
if (strlen(lat_str) > 9) {
printf("Invalid latitude\n");
return;
}
Expand All @@ -2922,7 +2922,7 @@ void CQnetGateway::build_aprs_from_gps_and_send(short int rptr_idx)
printf("Invalid East or West indicator in longitude\n");
return;
}
if (strlen(lon_str) != 10) {
if (strlen(lon_str) > 10) {
printf("Invalid longitude\n");
return;
}
Expand Down
1 change: 1 addition & 0 deletions QnetGateway.h
Expand Up @@ -18,6 +18,7 @@

#include <libconfig.h++>
#include "QnetTypeDefs.h"
#include "SEcho.h"

#include "aprs.h"

Expand Down
1 change: 1 addition & 0 deletions QnetLink.h
Expand Up @@ -28,6 +28,7 @@
#include <libconfig.h++>
#include "versions.h"
#include "QnetTypeDefs.h"
#include "SEcho.h"
#include "Random.h"

using namespace libconfig;
Expand Down
10 changes: 0 additions & 10 deletions QnetTypeDefs.h
Expand Up @@ -123,13 +123,3 @@ typedef struct dsrp_tag { // offset size
};
} SDSRP;
#pragma pack(pop)

typedef struct echo_tag {
bool is_linked;
time_t last_time;
unsigned short streamid;
int fd;
char message[24];
SDSVT header;
char file[FILENAME_MAX + 1];
} SECHO;
28 changes: 28 additions & 0 deletions SEcho.h
@@ -0,0 +1,28 @@
#pragma once
/*
* Copyright 2018 by Thomas Early, N7TAE
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

typedef struct echo_tag {
bool is_linked;
time_t last_time;
unsigned short streamid;
int fd;
char message[24];
SDSVT header;
char file[FILENAME_MAX + 1];
} SECHO;
4 changes: 2 additions & 2 deletions versions.h
@@ -1,6 +1,6 @@
// version strings must be 55 characters or less!
#define IRCDDB_VERSION "QnetGateway-7.4.4"
#define LINK_VERSION "QnetLink-6.3.0"
#define IRCDDB_VERSION "QnetGateway-7.4.5"
#define LINK_VERSION "QnetLink-6.3.1"
#define DVAP_VERSION "QnetDVAP-5.1.2"
#define RELAY_VERSION "QnetRelay-0.2.3"
#define ITAP_VERSION "QnetITAP-0.2.1"
Expand Down

0 comments on commit 9ab25c7

Please sign in to comment.