another gps try

pull/14/head
Tom Early 6 years ago
parent 0b23349088
commit 26d66a8f62

@ -996,9 +996,6 @@ void CQnetGateway::ProcessIncomingSD(const SDSVT &dsvt)
if (sd.size > 5) { if (sd.size > 5) {
printf("got a size of %d\n", sd.size); printf("got a size of %d\n", sd.size);
sd.size = 5; sd.size = 5;
} else if (sd.size < 0) {
printf("got a size of %d\n", sd.size);
sd.size = 0;
} }
int size = sd.size; int size = sd.size;
if (size > 2) if (size > 2)
@ -1071,6 +1068,10 @@ void CQnetGateway::ProcessIncomingSD(const SDSVT &dsvt)
sd.ig = 0; sd.ig = 0;
} else { } else {
sd.ig += sd.size; sd.ig += sd.size;
sd.gps[sd.ig] = 0;
for (int j=0; sd.gps[j]; j++)
printf("%c", sd.gps[j]);
printf("\n");
} }
break; break;
case 0x40U: // message case 0x40U: // message

@ -81,12 +81,12 @@ using SBANDTXT = struct band_txt_tag {
using SSD = struct sd_tag { using SSD = struct sd_tag {
unsigned char header[41]; unsigned char header[41];
char message[21]; unsigned char message[21];
char gps[256]; unsigned char gps[256];
int ih, im, ig; unsigned int ih, im, ig;
unsigned char type; unsigned char type;
bool first; bool first;
int size; unsigned int size;
void Init() { ih = im = ig = 0; first = true; } void Init() { ih = im = ig = 0; first = true; }
}; };

Loading…
Cancel
Save

Powered by TurnKey Linux.