Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem dspmodified mbed
Revision 27:4eb9687ab6c2, committed 2015-06-26
- Comitter:
- lalitkumar
- Date:
- Fri Jun 26 11:27:07 2015 +0000
- Parent:
- 26:256bf8284cb6
- Child:
- 28:9d2635dcb8ff
- Commit message:
- timestamp array size bug fixed
Changed in this revision
| merged_code.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/merged_code.cpp Fri Jun 26 08:51:50 2015 +0000
+++ b/merged_code.cpp Fri Jun 26 11:27:07 2015 +0000
@@ -27,11 +27,11 @@
char sitename[10] =module_name;
char filename[100] = "";
char filepath[100] = "";
-char timestamp[20]="";
-char csq[20]="";
+char timestamp[50]="";
+char csq[50]="";
char csq_value[2]="";
char time_stamp[20]="";
-char timestampold[20]="";
+char timestampold[100]="";
char main_dir[100] ="";
char hour_dir[100] ="";
char pathAC[100] ="";
@@ -131,9 +131,9 @@
}
if(clk_flag == 3)
{
- //pc.printf("\r\ncsq updated\r\n");
+ pc.printf("timestamp stored11: %s", time_stamp);
sprintf(csq,response);
- //pc.printf("%s",csq); //copies response to csq for further processing
+ pc.printf("timestamp stored12: %s", time_stamp); //copies response to csq for further processing
}
//pc.printf("\r\nanswer %d\r\n",answer);
return answer;
@@ -262,7 +262,7 @@
second = (timestamp[x+16]-48)*10+(timestamp[x+17]-48);
sprintf(time_stamp,"%02d%02d%02d%02d%02d%02d",year,month,date,hour,minute,second);
- //pc.printf("Get time result:%s.....",time_stamp);
+ pc.printf("Get time result:%s.....",time_stamp);
if(sendATcommand("AT+CSQ","OK",5,3)){
if(csq[18]==44){
int csq_calc=10*(csq[16]-48)+(csq[17]-48);
@@ -622,7 +622,6 @@
float AC_mean_value=0;
float DC_rms_value=0;
float DC_mean_value=0;
-
//AC fft
for(int i=0; i<fft_points; i++)
{
@@ -646,8 +645,7 @@
//reset_mod();
}
else
- {
- fprintf(fp, "%s",time_stamp);
+ { fprintf(fp, "%s",time_stamp);
fprintf(fp, " CSQ %s",csq_value);
fprintf(fp, " AD1 %d",avg_dc_detect[0]);
fprintf(fp, " AD2 %d",avg_dc_detect[1]);
@@ -1090,7 +1088,7 @@
else
{
fprintf(fp, "\r\n%s",time_stamp);
- pc.printf("\r\n%s",time_stamp);
+ pc.printf("timestamp: \r\n%s",time_stamp);
fclose(fp);
}
pc.printf("\r\n Timestamp saved");