From db15bcc216c059af07242c543493d6dd3087abdc Mon Sep 17 00:00:00 2001 From: SP9SKP Date: Fri, 28 Dec 2018 11:51:00 +0100 Subject: [PATCH] wylaczenie logowania, nie wysyla do mnie, poprawka w 2019 :) --- VER.txt | 2 +- src/sondemod.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/VER.txt b/VER.txt index 154f9a8..ffe47ca 100644 --- a/VER.txt +++ b/VER.txt @@ -1 +1 @@ -20181218 \ No newline at end of file +27181218 \ No newline at end of file diff --git a/src/sondemod.c b/src/sondemod.c index 64021ed..fca6e39 100644 --- a/src/sondemod.c +++ b/src/sondemod.c @@ -597,6 +597,9 @@ void saveMysql( char *name,unsigned int frameno, double lat, double lon, double if (sendto(sockfd, UDPbuf, BUFLEN, 0, (struct sockaddr*)&serv_addr, slen)==-1) printf("err: sendto()"); + else + printf("send to DB\n"); + } } @@ -610,7 +613,7 @@ int store_sonde_db( char *name,unsigned int frameno, double lat, double lon, dou int i,newS=1; time_t minTime=time(NULL),difftime,lTime=time(NULL); struct tm* tm_info; - +/* tm_info = localtime(&lTime); char s[30],s1[20],sf[50]; @@ -618,7 +621,7 @@ int store_sonde_db( char *name,unsigned int frameno, double lat, double lon, dou strftime(s1, 26, "%Y-%m-%d", tm_info); sprintf(sf,"/tmp/log_%s.csv",s1); FILE* fi; - +*/ if(t1<-250 || t1>80) t1=0; if(t2<-250 || t2>80) t2=0; @@ -665,6 +668,7 @@ int store_sonde_db( char *name,unsigned int frameno, double lat, double lon, dou //char *name,frameno, lat, lon, alt,speed, dir,clmb,typ, ozon,aux,press, frq,vbat, float t1, float t2, float hum // M4353239;01151;49.44570;17.14525;1704 ; 9.14;162.18;5.28;9 ,0.000;0 ; 0.0; 0;0.0 ;0.0;0.0;0.0 // M4353239;02920;49.38820;17.25604;10342;22.68;158.89;5.77;9 ,0.000;0 ;244.3;2684354560;0.0 ;26815615859 +/* if(saveLog){ fi = fopen(sf, "a+"); if (fi){ @@ -673,6 +677,7 @@ int store_sonde_db( char *name,unsigned int frameno, double lat, double lon, dou } fclose(fi); } +*/ }