Sd+Serial pcapAdd() and logAdd() in buffer_obj

This commit is contained in:
Willy-JL
2023-12-31 16:10:00 +01:00
parent d0f5d89980
commit f6c27ed216
9 changed files with 44 additions and 86 deletions

View File

@@ -73,8 +73,6 @@ bool SDInterface::initSD() {
this->card_sz = sz;
}
buffer_obj = Buffer();
if (!SD.exists("/SCRIPTS")) {
Serial.println("/SCRIPTS does not exist. Creating...");
@@ -142,12 +140,6 @@ void SDInterface::listDir(String str_dir){
}
}
void SDInterface::addPacket(uint8_t* buf, uint32_t len, bool log) {
if (this->supported) {
buffer_obj.addPacket(buf, len, log);
}
}
void SDInterface::openCapture(String file_name) {
bool save_pcap = settings_obj.loadSetting<bool>("SavePCAP");
if ((this->supported) && (save_pcap)) {