[sdlog] Make compatible with PX4FMU_2.4

This commit is contained in:
Michal Podhradsky
2017-02-17 10:59:06 -08:00
parent 5539bc81ac
commit 4e8bbbf7c0
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ static void thd_startlog(void *arg)
chThdSleepMilliseconds (sdOk == true ? 1000 : 200);
static uint32_t timestamp = 0;
#if HAL_USE_RTC
#if HAL_USE_RTC && USE_GPS
// FIXME this could be done somewhere else, like in sys_time
// we sync gps time to rtc every 5 seconds
if (chVTGetSystemTime() - timestamp > 5000) {
@@ -223,7 +223,11 @@ const USBConfig usbConfig = {
/* Turns on a LED when there is I/O activity on the USB port */
static void usbActivity(bool active)
{
#ifdef GPIOC_LED4
palWritePad(GPIOC, GPIOC_LED4, active);
#else
(void)active;
#endif
}
/* USB mass storage configuration */
@@ -279,6 +283,7 @@ static void thdUsbStorage(void *arg)
// used via libopencm3, ISR are routed on pprz/opencm3 and cannot
// be used concurrently by chibios api
// Should be fixed when using chibios-rt branch
// FIXME: Is the comment still relevant?
while (!chThdShouldTerminateX() && antiBounce) {
const bool usbConnected = palReadPad(GPIOA, GPIOA_OTG_FS_VBUS);
if (usbConnected) {