AP_Filesystem: move AP_RTC::mktime to be ap_mktime

in preparation for AP_RTC_ENABLED
This commit is contained in:
Peter Barker 2023-06-22 14:21:43 +10:00 committed by Andrew Tridgell
parent 539277ba2f
commit ac2fea9766
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h> #include <AP_Math/AP_Math.h>
#include <stdio.h> #include <stdio.h>
#include <AP_RTC/AP_RTC.h> #include <AP_Common/time.h>
#include <ff.h> #include <ff.h>
#include <AP_HAL_ChibiOS/sdcard.h> #include <AP_HAL_ChibiOS/sdcard.h>
@ -564,7 +564,7 @@ static time_t fat_time_to_unix(uint16_t date, uint16_t time)
tp.tm_mday = (date & 0x1f); tp.tm_mday = (date & 0x1f);
tp.tm_mon = ((date >> 5) & 0x0f) - 1; tp.tm_mon = ((date >> 5) & 0x0f) - 1;
tp.tm_year = ((date >> 9) & 0x7f) + 80; tp.tm_year = ((date >> 9) & 0x7f) + 80;
unix = AP::rtc().mktime(&tp); unix = ap_mktime(&tp);
return unix; return unix;
} }