fix RS41 subtype

pull/183/head^2
Hansi, dl9rdz 2021-09-20 16:20:53 +02:00
rodzic 71c42c938b
commit 2dcbcc3141
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;