pull/1/head
SP9SKP 2021-05-14 21:35:43 +02:00
rodzic e8283347ae
commit 8dc425a447
2 zmienionych plików z 9 dodań i 8 usunięć

Wyświetl plik

@ -3325,12 +3325,13 @@ static void decodem10(char rxb[], uint32_t rxb_len, uint32_t ip, uint32_t frompo
float vbat,temp1,temp2;
char to[1200];
uint32_t time0;
int typ;
switch((unsigned char)(rxb[5]-',')){
case 0: typ=ST_M10; break;
case 1: typ=ST_M10GT; break;
case 2: typ=ST_M2K2; break;
int typ,typt;
typt=(unsigned char)rxb[5]-',';
switch(typt){
case 1: typ=ST_M10; break;
case 2: typ=ST_M10GT; break;
case 3: typ=ST_M2K2; break;
}
rxb[5]=',';

Wyświetl plik

@ -2192,8 +2192,8 @@ static void decodeframe10(uint32_t m)
for(i=0;i<9;i++) //nazwa
s[i+13]=ids[i];
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 &&
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 && 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);
alludp(chan[m].udptx, 105, s, 105);
}