diff --git a/sw/airborne/modules/loggers/sdlog_chibios.c b/sw/airborne/modules/loggers/sdlog_chibios.c index 7f1eeb75eb..0d4a1c2b3c 100644 --- a/sw/airborne/modules/loggers/sdlog_chibios.c +++ b/sw/airborne/modules/loggers/sdlog_chibios.c @@ -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) { diff --git a/sw/airborne/modules/loggers/sdlog_chibios/usbStorage.c b/sw/airborne/modules/loggers/sdlog_chibios/usbStorage.c index 5ce6297fd6..370efb6355 100644 --- a/sw/airborne/modules/loggers/sdlog_chibios/usbStorage.c +++ b/sw/airborne/modules/loggers/sdlog_chibios/usbStorage.c @@ -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) {