Skip to content

Commit 43f65e1

Browse files
authored
Merge branch 'master' into hw_serial_cdc_as_component_example
2 parents 95f95c5 + b2c805a commit 43f65e1

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

libraries/FFat/src/FFat.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,4 @@ size_t F_Fat::freeBytes() {
152152
return free_sect * sect_size;
153153
}
154154

155-
bool F_Fat::exists(const char *path) {
156-
File f = open(path, "r", false);
157-
return (f == true) && !f.isDirectory();
158-
}
159-
160-
bool F_Fat::exists(const String &path) {
161-
return exists(path.c_str());
162-
}
163-
164155
F_Fat FFat = F_Fat(FSImplPtr(new VFSImpl()));

libraries/FFat/src/FFat.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class F_Fat : public FS {
3232
size_t usedBytes();
3333
size_t freeBytes();
3434
void end();
35-
bool exists(const char *path);
36-
bool exists(const String &path);
3735

3836
private:
3937
wl_handle_t _wl_handle = WL_INVALID_HANDLE;

libraries/LittleFS/src/LittleFS.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ class LittleFSImpl : public VFSImpl {
3333
public:
3434
LittleFSImpl();
3535
virtual ~LittleFSImpl() {}
36-
virtual bool exists(const char *path);
3736
};
3837

3938
LittleFSImpl::LittleFSImpl() {}
4039

41-
bool LittleFSImpl::exists(const char *path) {
42-
File f = open(path, "r", false);
43-
return (f == true);
44-
}
45-
4640
LittleFSFS::LittleFSFS() : FS(FSImplPtr(new LittleFSImpl())), partitionLabel_(NULL) {}
4741

4842
LittleFSFS::~LittleFSFS() {

libraries/PPP/src/PPP.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,17 @@ bool PPPClass::begin(ppp_modem_model_t model, uint8_t uart_num, int baud_rate) {
324324
} else {
325325
// try to communicate with the modem
326326
if (esp_modem_sync(_dce) != ESP_OK) {
327-
log_v("Modem does not respond to AT, maybe in DATA mode? ...exiting network mode");
327+
log_v("Modem does not respond to AT! Switching to COMMAND mode.");
328328
esp_modem_set_mode(_dce, ESP_MODEM_MODE_COMMAND);
329+
if (esp_modem_sync(_dce) != ESP_OK) {
330+
log_v("Modem does not respond to AT! Switching to CMUX mode.");
331+
if (esp_modem_set_mode(_dce, ESP_MODEM_MODE_CMUX) != ESP_OK) {
332+
log_v("Modem failed to switch to CMUX mode!");
333+
} else {
334+
log_v("Switching back to COMMAND mode");
335+
esp_modem_set_mode(_dce, ESP_MODEM_MODE_COMMAND);
336+
}
337+
}
329338
if (esp_modem_sync(_dce) != ESP_OK) {
330339
log_e("Modem failed to respond to AT!");
331340
goto err;

0 commit comments

Comments
 (0)