Skip to content

Commit 91025f8

Browse files
authored
Merge branch 'master' into idf-release/v4.2
2 parents a2e0e86 + e41fb08 commit 91025f8

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

libraries/FFat/src/FFat.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,21 @@ size_t F_Fat::totalBytes()
135135
return tot_sect * sect_size;
136136
}
137137

138+
size_t F_Fat::usedBytes()
139+
{
140+
FATFS *fs;
141+
DWORD free_clust, used_sect, sect_size;
142+
143+
BYTE pdrv = ff_diskio_get_pdrv_wl(_wl_handle);
144+
char drv[3] = {(char)(48+pdrv), ':', 0};
145+
if ( f_getfree(drv, &free_clust, &fs) != FR_OK){
146+
return 0;
147+
}
148+
used_sect = (fs->n_fatent - 2 - free_clust) * fs->csize;
149+
sect_size = CONFIG_WL_SECTOR_SIZE;
150+
return used_sect * sect_size;
151+
}
152+
138153
size_t F_Fat::freeBytes()
139154
{
140155

libraries/FFat/src/FFat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class F_Fat : public FS
3131
bool begin(bool formatOnFail=false, const char * basePath="/ffat", uint8_t maxOpenFiles=10, const char * partitionLabel = (char*)FFAT_PARTITION_LABEL);
3232
bool format(bool full_wipe = FFAT_WIPE_QUICK, char* partitionLabel = (char*)FFAT_PARTITION_LABEL);
3333
size_t totalBytes();
34+
size_t usedBytes();
3435
size_t freeBytes();
3536
void end();
3637
bool exists(const char* path);

libraries/WebServer/src/WebServer.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,12 @@ void WebServer::handleClient() {
313313
_contentLength = CONTENT_LENGTH_NOT_SET;
314314
_handleRequest();
315315

316-
if (_currentClient.connected()) {
317-
_currentStatus = HC_WAIT_CLOSE;
318-
_statusChange = millis();
319-
keepCurrentClient = true;
320-
}
316+
// Fix for issue with Chrome based browsers: https://github.com/espressif/arduino-esp32/issues/3652
317+
// if (_currentClient.connected()) {
318+
// _currentStatus = HC_WAIT_CLOSE;
319+
// _statusChange = millis();
320+
// keepCurrentClient = true;
321+
// }
321322
}
322323
} else { // !_currentClient.available()
323324
if (millis() - _statusChange <= HTTP_MAX_DATA_WAIT) {

package/package_esp32_index.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
{
4242
"packager": "esp32",
4343
"name": "esptool_py",
44-
"version": "2.6.1"
44+
"version": "3.0.0"
4545
},
4646
{
4747
"packager": "esp32",

0 commit comments

Comments
 (0)