File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ void PCAP::startSerial(){
1515 serialwrite_32 (network);
1616}
1717
18- #if defined(ESP32) || defined(__XTENSA__)
18+ #if defined(ESP32)
1919 /* open file on SD card (when exists) */
2020 bool PCAP::openFile (fs::FS &fs){
2121 if (fs.exists (filename.c_str ())) removeFile (fs);
@@ -76,8 +76,10 @@ void PCAP::closeFile(){
7676void PCAP::newPacketSerial (uint32_t ts_sec, uint32_t ts_usec, uint32_t len, uint8_t * buf){
7777 uint32_t orig_len = len;
7878 uint32_t incl_len = len;
79- // if(incl_len > snaplen) incl_len = snaplen; /* safty check that the packet isn't too big (I ran into problems here) */
80-
79+
80+ #if defined(ESP32)
81+ if (incl_len > snaplen) incl_len = snaplen; /* safty check that the packet isn't too big (I ran into problems with the ESP8266 here) */
82+ #endif
8183 serialwrite_32 (ts_sec);
8284 serialwrite_32 (ts_usec);
8385 serialwrite_32 (incl_len);
Original file line number Diff line number Diff line change 99#define PCAP_h
1010
1111#include < Arduino.h>
12- #if defined(ESP32) || defined(__XTENSA__)
12+ #include " SPI.h"
13+ #if defined(ESP32)
1314 #include " FS.h"
1415 #include " SD.h"
15- #include " SPI.h"
1616#else
1717 #include < SPI.h>
1818 #include < SdFat.h>
@@ -24,7 +24,7 @@ class PCAP
2424 PCAP ();
2525
2626 void startSerial ();
27- #if defined(ESP32) || defined(__XTENSA__)
27+ #if defined(ESP32)
2828 bool openFile (fs::FS &fs);
2929 bool removeFile (fs::FS &fs);
3030#else
You can’t perform that action at this time.
0 commit comments