if(Y)
{
sprintf(distance_str, "%5d %5d %5d %5d\r\n", H,h,C,t);//¼ÓÈë»»Ðзû\nsd¿¨ÖÐûÓÐÊý¾Ý
res=f_open(&file,"/count.txt",FA_OPEN_ALWAYS); //´ò¿ª»òÕßн¨Îļþ¼Ð
if(res==FR_OK)
{
f_open(&file, "/count.txt", FA_WRITE | FA_CREATE_ALWAYS);
{
f_lseek(&file,f_size(&file));
res=f_write(&file, distance_str, sizeof(distance_str),&bw);
//res=f_write(&file, distance_str, 30,&bw);//30³¤¶È
}
f_close(&file);
}
}
还是不行,还是只显示最后一组数据 |