diff --git a/libraries/DataFlash/DataFlash_APM2.cpp b/libraries/DataFlash/DataFlash_APM2.cpp index 45dfa510ac..8fd8b5eb38 100644 --- a/libraries/DataFlash/DataFlash_APM2.cpp +++ b/libraries/DataFlash/DataFlash_APM2.cpp @@ -153,7 +153,7 @@ void DataFlash_APM2::ReadManufacturerID() // This function return 1 if Card is inserted on SD slot bool DataFlash_APM2::CardInserted() { - return (digitalRead(DF_CARDDETECT) != 0); + return (digitalRead(DF_CARDDETECT) == 0); } // Read the status register