fix RS41 subtype

This commit is contained in:
Hansi, dl9rdz 2021-09-20 16:20:53 +02:00
parent 71c42c938b
commit 2dcbcc3141
1 changed files with 1 additions and 1 deletions

View File

@ -862,7 +862,7 @@ int RS41::waitRXcomplete() {
int RS41::getSubtype(char *buf, int buflen, SondeInfo *si) {
struct subframeBuffer *sf = (struct subframeBuffer *)si->extra;
if(!sf) return -1;
if( (sf->valid & (3<<21)) != (3<<21) ) return -1; // or 1 instead of 3 for the first 8 chars only, as in autorx?
if( (sf->valid & (3<<0x21)) != (3<<0x21) ) return -1; // or 1 instead of 3 for the first 8 chars only, as in autorx?
if(buflen>11) buflen=11; // then buflen should be capped at 9 (8+trailing \0)
strncpy(buf, sf->value.names.variant, buflen);
buf[buflen-1]=0;