Skip to content

Commit a0be262

Browse files
committed
replace cardSize() with sectorCount()
1 parent 7fc6d2e commit a0be262

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_PyCamera.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ bool Adafruit_PyCamera::initSD(void) {
169169
}
170170

171171
Serial.println("Card successfully initialized");
172-
uint32_t size = sd.card()->cardSize();
172+
uint32_t size = sd.card()->sectorCount();
173173
if (size == 0) {
174174
Serial.println("Can't determine the card size");
175175
} else {
@@ -494,7 +494,7 @@ bool Adafruit_PyCamera::takePhoto(const char *filename_base,
494494
return false;
495495
}
496496

497-
if (!sd.card() || (sd.card()->cardSize() == 0)) {
497+
if (!sd.card() || (sd.card()->sectorCount() == 0)) {
498498
Serial.println("No SD card found");
499499
// try to initialize?
500500
if (!initSD())

0 commit comments

Comments
 (0)