diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-11-17 16:01:31 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-11-17 16:01:31 +0200 |
| commit | 19ac98b8c46b352fd99fa7c8f320fae6e1572b99 (patch) | |
| tree | 744881075b837310cdf0b7399946e952c1dc782b /Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | |
| parent | c70273e22beeee78b6ba7e60c365f1f860fc7848 (diff) | |
| parent | 5c147231611ca2a99702152ad3073524347a24b9 (diff) | |
| download | Tango-19ac98b8c46b352fd99fa7c8f320fae6e1572b99.tar.gz Tango-19ac98b8c46b352fd99fa7c8f320fae6e1572b99.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index b59194af6..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]; @@ -726,7 +726,14 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) usnprintf(&FullPath[i], 50, "%s%s", request->path, fno[i]->fname); else usnprintf(&FullPath[i], 50, "%s%s%s", request->path,"/", fno[i]->fname); - Data[i].fullpath = &FullPath[i]; + 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; |
