Skip to content

Commit

Permalink
small fixes (#23)
Browse files Browse the repository at this point in the history
* cast, fixes #8

* Arduino Server preferred API: ::available() -> ::accept()

* update to newer esp8266 ESP.getHeapStats api
  • Loading branch information
d-a-v authored Jan 18, 2023
1 parent 784515d commit 971a5e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ESPWebDAV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ void ESPWebDAVCore::handlePut(ResourceType resource)
size_t written = 0;
while (written < numRead)
{
auto numWrite = file.write(buf + written, numRead - written);
auto numWrite = file.write((uint8_t*)buf + written, numRead - written);
if (numWrite == 0 || (int)numWrite == -1)
{
DBG_PRINT("error: numread=%d write=%d written=%d", (int)numRead, (int)numWrite, (int)written);
Expand Down
2 changes: 1 addition & 1 deletion WebSrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void ESPWebDAV::handleClient()
{
// no or sleeping current client
// take it over
locClient = server->available();
locClient = server->accept();
m_persistent_timer_ms = millis();
DBG_PRINT("NEW CLIENT-------------------------------------------------------");
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Hooked/Hooked.ino
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void help()
Serial.printf("interactive: F/ormat D/ir C/reateFile\n");

uint32_t freeHeap;
uint16_t maxBlock;
uint32_t maxBlock;
uint8_t fragmentation;
ESP.getHeapStats(&freeHeap, &maxBlock, &fragmentation);
Serial.printf("Heap stats: free heap: %u - max block: %u - fragmentation: %u%%\n",
Expand Down

0 comments on commit 971a5e8

Please sign in to comment.