mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
[sdlog] Make compatible with PX4FMU_2.4
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user