![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
storing variables in single array for transmission
Dependencies: SDFileSystem dspmodified mbed
Fork of FTPGET_Merged by
Diff: merged_code.cpp
- Revision:
- 16:622629b0cf3c
- Parent:
- 15:f2a7003fcea1
- Child:
- 17:824537d9204b
--- a/merged_code.cpp Wed Apr 29 12:18:21 2015 +0000 +++ b/merged_code.cpp Thu Apr 30 08:48:20 2015 +0000 @@ -41,8 +41,9 @@ char clk_response[100] =""; char ftpget[100]=""; // For FTPGET Function char ftpget1[100]=""; // For FTPGET Function +char ftpget2[100]=""; // For FTPGET Function char mod_reset[50]= "NVIC_SystemReset();"; // For FTPGET Function -char incoming_data[100]=""; // For FTPGET Function +char incoming_data[150]=""; // For FTPGET Function char dest[100]=""; // For FTPGET Function const char s[2] = "!"; // For FTPGET Function char src[100]=""; // For FTPGET Function @@ -699,7 +700,7 @@ sprintf(ftpfilename,"%s",ftpget); // For Request of multiple file path logic refer abc.text sprintf(ftpfilepath,"%s",ftpget1); - sprintf(ftpputpathname,"%s/%02d%02d/%02d/%02d",module_name,year,month,date,hour); + sprintf(ftpputpathname,"%s",ftpget2); } else if (ftp_type==2) { @@ -860,6 +861,9 @@ token = strtok(NULL,s); sprintf(ftpget1,"%s",token); pc.printf("Ftpget1 is %s\r\n",ftpget1); + token = strtok(NULL,s); + sprintf(ftpget2,"%s",token); + pc.printf("Ftpget2 is %s\r\n",ftpget2); ftp_connect(); wait(5); ftp_put(1); @@ -979,7 +983,7 @@ sampling(); store(); FTP_Fun(); - downloadFTP(); // For testing purpose + //downloadFTP(); // For testing purpose if (old_hour!=100 && hour!=old_hour && hour<24) { pc.printf("\r\nhour changed"); @@ -989,12 +993,12 @@ sprintf(pathfft,"%s",timestamppath_old); ftp_put(0); } - //downloadFTP(); // For FTPGET Function + downloadFTP(); // For FTPGET Function } pc.printf("\r\n Complete Done"); old_hour=hour; sprintf(timestampname_old,timestampname); - sprintf(timestamppath_old,timestamppath); + sprintf(timestamppath_old,timestamppath); if(hour%2>0 || loopcount>120) { if((minute>3 && minute<6)||(loopcount>120))