From 0d836ced3dbe4a31916064bdf89fe1c8283c011f Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 17 Nov 2020 14:39:41 +0200 Subject: Version 1.5.2(1): fix some bugs. improve / fix Update Pid during run, and cartridge state --- Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c') diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index 76c2fe9f2..77efa1cfd 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -653,7 +653,7 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) GetFilesRequest* request = get_files_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); GetFilesResponse response = GET_FILES_RESPONSE__INIT; - + //struct tm RTC_time; #define MAX_NUM_OF_FILES 20 DIR dir; FILINFO* fno[MAX_NUM_OF_FILES]; @@ -727,6 +727,13 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) else usnprintf(&FullPath[i], 50, "%s%s%s", request->path,"/", fno[i]->fname); Data[i].fullpath = &FullPath[i][0]; + /*RTC_time.tm_year=(fno[i]->fdate>>9)+1980;//populate the time struct (FAT start==1980, RTC.year==0) + RTC_time.tm_mon=(fno[i]->fdate>>5)&0x000F; + RTC_time.tm_mday=fno[i]->fdate&0x001F; + RTC_time.tm_hour=(fno[i]->ftime>>11)&0x001F; + RTC_time.tm_min=(fno[i]->ftime>>5)&0x003F; + RTC_time.tm_sec=(fno[i]->ftime<<1)&0x003E;*/ + } response.n_items = NumOfFiles; -- cgit v1.3.1