File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ void PCAP::startSerial(){
15
15
serialwrite_32 (network);
16
16
}
17
17
18
- #if defined(ESP32) || defined(__XTENSA__)
18
+ #if defined(ESP32)
19
19
/* open file on SD card (when exists) */
20
20
bool PCAP::openFile (fs::FS &fs){
21
21
if (fs.exists (filename.c_str ())) removeFile (fs);
@@ -76,8 +76,10 @@ void PCAP::closeFile(){
76
76
void PCAP::newPacketSerial (uint32_t ts_sec, uint32_t ts_usec, uint32_t len, uint8_t * buf){
77
77
uint32_t orig_len = len;
78
78
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
81
83
serialwrite_32 (ts_sec);
82
84
serialwrite_32 (ts_usec);
83
85
serialwrite_32 (incl_len);
Original file line number Diff line number Diff line change 9
9
#define PCAP_h
10
10
11
11
#include < Arduino.h>
12
- #if defined(ESP32) || defined(__XTENSA__)
12
+ #include " SPI.h"
13
+ #if defined(ESP32)
13
14
#include " FS.h"
14
15
#include " SD.h"
15
- #include " SPI.h"
16
16
#else
17
17
#include < SPI.h>
18
18
#include < SdFat.h>
@@ -24,7 +24,7 @@ class PCAP
24
24
PCAP ();
25
25
26
26
void startSerial ();
27
- #if defined(ESP32) || defined(__XTENSA__)
27
+ #if defined(ESP32)
28
28
bool openFile (fs::FS &fs);
29
29
bool removeFile (fs::FS &fs);
30
30
#else
You can’t perform that action at this time.
0 commit comments