Fix open files when SD disable

This commit is contained in:
Just Call Me Koko
2023-05-19 16:19:45 -04:00
parent 6b4e2952d6
commit 0a90e6aedc
3 changed files with 81 additions and 31 deletions

View File

@@ -76,9 +76,11 @@ void SDInterface::addPacket(uint8_t* buf, uint32_t len) {
}
void SDInterface::openCapture(String file_name) {
if (this->supported)
bool save_pcap = settings_obj.loadSetting<bool>("SavePCAP");
if ((this->supported) && (save_pcap)) {
buffer_obj.createPcapFile(&SD, file_name);
buffer_obj.open();
}
}
void SDInterface::runUpdate() {