Skip to content

Commit 70e2215

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

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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())

Adafruit_PyCamera.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <Adafruit_AW9523.h>
44
#include <Adafruit_NeoPixel.h>
55
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
6-
#include <SdFat.h>
6+
#include <SdFat_Adafruit_Fork.h>
77

88
#ifndef TAG
99
#define TAG "PYCAM"

0 commit comments

Comments
 (0)