From da21947fe97dd5499aad30f9e2e4f4028f1a0b63 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 29 Dec 2018 09:40:18 +1100 Subject: [PATCH] HAL_ChibiOS: fixed card inserted test for SDC --- libraries/AP_HAL_ChibiOS/hwdef/common/board.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/board.c b/libraries/AP_HAL_ChibiOS/hwdef/common/board.c index a45cf7416e..1b32766ead 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/board.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/board.c @@ -78,11 +78,8 @@ void __late_init(void) { * @brief SDC card detection. */ bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - static bool last_status = false; - - if (blkIsTransferring(sdcp)) - return last_status; - return last_status = (bool)palReadPad(GPIOC, 11); + (void)sdcp; + return true; } /**