kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
fix RS41 subtype
rodzic
71c42c938b
commit
2dcbcc3141
|
@ -862,7 +862,7 @@ int RS41::waitRXcomplete() {
|
||||||
int RS41::getSubtype(char *buf, int buflen, SondeInfo *si) {
|
int RS41::getSubtype(char *buf, int buflen, SondeInfo *si) {
|
||||||
struct subframeBuffer *sf = (struct subframeBuffer *)si->extra;
|
struct subframeBuffer *sf = (struct subframeBuffer *)si->extra;
|
||||||
if(!sf) return -1;
|
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)
|
if(buflen>11) buflen=11; // then buflen should be capped at 9 (8+trailing \0)
|
||||||
strncpy(buf, sf->value.names.variant, buflen);
|
strncpy(buf, sf->value.names.variant, buflen);
|
||||||
buf[buflen-1]=0;
|
buf[buflen-1]=0;
|
||||||
|
|
Ładowanie…
Reference in New Issue