forked from espressif/arduino-esp32
Merge branch 'master' into idf-release/v4.2
This commit is contained in:
@ -135,6 +135,21 @@ size_t F_Fat::totalBytes()
|
|||||||
return tot_sect * sect_size;
|
return tot_sect * sect_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t F_Fat::usedBytes()
|
||||||
|
{
|
||||||
|
FATFS *fs;
|
||||||
|
DWORD free_clust, used_sect, sect_size;
|
||||||
|
|
||||||
|
BYTE pdrv = ff_diskio_get_pdrv_wl(_wl_handle);
|
||||||
|
char drv[3] = {(char)(48+pdrv), ':', 0};
|
||||||
|
if ( f_getfree(drv, &free_clust, &fs) != FR_OK){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
used_sect = (fs->n_fatent - 2 - free_clust) * fs->csize;
|
||||||
|
sect_size = CONFIG_WL_SECTOR_SIZE;
|
||||||
|
return used_sect * sect_size;
|
||||||
|
}
|
||||||
|
|
||||||
size_t F_Fat::freeBytes()
|
size_t F_Fat::freeBytes()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
bool begin(bool formatOnFail=false, const char * basePath="/ffat", uint8_t maxOpenFiles=10, const char * partitionLabel = (char*)FFAT_PARTITION_LABEL);
|
bool begin(bool formatOnFail=false, const char * basePath="/ffat", uint8_t maxOpenFiles=10, const char * partitionLabel = (char*)FFAT_PARTITION_LABEL);
|
||||||
bool format(bool full_wipe = FFAT_WIPE_QUICK, char* partitionLabel = (char*)FFAT_PARTITION_LABEL);
|
bool format(bool full_wipe = FFAT_WIPE_QUICK, char* partitionLabel = (char*)FFAT_PARTITION_LABEL);
|
||||||
size_t totalBytes();
|
size_t totalBytes();
|
||||||
|
size_t usedBytes();
|
||||||
size_t freeBytes();
|
size_t freeBytes();
|
||||||
void end();
|
void end();
|
||||||
bool exists(const char* path);
|
bool exists(const char* path);
|
||||||
|
@ -313,11 +313,12 @@ void WebServer::handleClient() {
|
|||||||
_contentLength = CONTENT_LENGTH_NOT_SET;
|
_contentLength = CONTENT_LENGTH_NOT_SET;
|
||||||
_handleRequest();
|
_handleRequest();
|
||||||
|
|
||||||
if (_currentClient.connected()) {
|
// Fix for issue with Chrome based browsers: https://github.com/espressif/arduino-esp32/issues/3652
|
||||||
_currentStatus = HC_WAIT_CLOSE;
|
// if (_currentClient.connected()) {
|
||||||
_statusChange = millis();
|
// _currentStatus = HC_WAIT_CLOSE;
|
||||||
keepCurrentClient = true;
|
// _statusChange = millis();
|
||||||
}
|
// keepCurrentClient = true;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
} else { // !_currentClient.available()
|
} else { // !_currentClient.available()
|
||||||
if (millis() - _statusChange <= HTTP_MAX_DATA_WAIT) {
|
if (millis() - _statusChange <= HTTP_MAX_DATA_WAIT) {
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
{
|
{
|
||||||
"packager": "esp32",
|
"packager": "esp32",
|
||||||
"name": "esptool_py",
|
"name": "esptool_py",
|
||||||
"version": "2.6.1"
|
"version": "3.0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"packager": "esp32",
|
"packager": "esp32",
|
||||||
|
Reference in New Issue
Block a user