kopia lustrzana https://github.com/sp9skp/spdxl
poprawki m2k2
rodzic
e8283347ae
commit
8dc425a447
|
@ -3325,12 +3325,13 @@ static void decodem10(char rxb[], uint32_t rxb_len, uint32_t ip, uint32_t frompo
|
||||||
float vbat,temp1,temp2;
|
float vbat,temp1,temp2;
|
||||||
char to[1200];
|
char to[1200];
|
||||||
uint32_t time0;
|
uint32_t time0;
|
||||||
int typ;
|
int typ,typt;
|
||||||
|
typt=(unsigned char)rxb[5]-',';
|
||||||
|
|
||||||
switch((unsigned char)(rxb[5]-',')){
|
switch(typt){
|
||||||
case 0: typ=ST_M10; break;
|
case 1: typ=ST_M10; break;
|
||||||
case 1: typ=ST_M10GT; break;
|
case 2: typ=ST_M10GT; break;
|
||||||
case 2: typ=ST_M2K2; break;
|
case 3: typ=ST_M2K2; break;
|
||||||
}
|
}
|
||||||
rxb[5]=',';
|
rxb[5]=',';
|
||||||
|
|
||||||
|
|
|
@ -2192,8 +2192,8 @@ static void decodeframe10(uint32_t m)
|
||||||
for(i=0;i<9;i++) //nazwa
|
for(i=0;i<9;i++) //nazwa
|
||||||
s[i+13]=ids[i];
|
s[i+13]=ids[i];
|
||||||
s[22]=0;
|
s[22]=0;
|
||||||
if( lat>-90.0 && lat<90.0 && lon>=-180.0 && lon<=180.0 && alt>0.0 && alt<45000.0 && dir>=0 && dir<361 && v>=0 && v<600 &&
|
//if( lat>-90.0 && lat<90.0 && lon>=-180.0 && lon<=180.0 && alt>0.0 && alt<45000.0 && dir>=0 && dir<361 && v>=0 && v<600 && vv>-200 && vv<200 && vbat>0 && vbat<10 && temp1>-270.0 && temp1<100.0 && temp2>-270.0 && temp2<100.0){
|
||||||
vv>-200 && vv<200 && vbat>0 && vbat<10 && temp1>-270.0 && temp1<100.0 && temp2>-270.0 && temp2<100.0){
|
if( lat>-90.0 && lat<90.0 && lon>=-180.0 && lon<=180.0 && alt>0.0 && alt<45000.0 && dir>=0 && dir<361 && v>=0 && v<600 && vv>-200 && vv<200 && vbat>0 && vbat<10){
|
||||||
sprintf(s,"%s,%012lu,%09.5f,%010.5f,%05.0f,%03.0f,%05.1f,%05.1f,%05.2f,%06.1f,%06.1f,%06.0f\n",s,time0,lat,lon,alt,dir,v,vv,vbat,temp1,temp2,fq555);
|
sprintf(s,"%s,%012lu,%09.5f,%010.5f,%05.0f,%03.0f,%05.1f,%05.1f,%05.2f,%06.1f,%06.1f,%06.0f\n",s,time0,lat,lon,alt,dir,v,vv,vbat,temp1,temp2,fq555);
|
||||||
alludp(chan[m].udptx, 105, s, 105);
|
alludp(chan[m].udptx, 105, s, 105);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue