Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.3.0 to fix issue with slow browsers or network
Browse files Browse the repository at this point in the history
### Releases v1.3.0

1. Fix issue with slow browsers or network. Check [Target stops responding after variable time when using Firefox on Windows 10 #3](khoih-prog/AsyncWebServer_RP2040W#3)
  • Loading branch information
khoih-prog authored Sep 26, 2022
1 parent e049af5 commit f934df6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#error For Portenta_H7 only
#endif

#define _PORTENTA_H7_AWS_LOGLEVEL_ 1
#define _PORTENTA_H7_ATCP_LOGLEVEL_ 1
#define _PORTENTA_H7_AWS_LOGLEVEL_ 1

#define USE_ETHERNET_PORTENTA_H7 true

Expand Down Expand Up @@ -149,7 +150,7 @@ void drawGraph(AsyncWebServerRequest *request)
{
String out;

out.reserve(3000);
out.reserve(4000);
char temp[70];

out += "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"310\" height=\"150\">\n";
Expand Down Expand Up @@ -218,8 +219,7 @@ void setup()
Serial.println(Ethernet.localIP());

///////////////////////////////////



server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
{
handleRoot(request);
Expand Down
8 changes: 5 additions & 3 deletions examples/Ethernet/Async_HelloServer/Async_HelloServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#error For Portenta_H7 only
#endif

#define _PORTENTA_H7_AWS_LOGLEVEL_ 1
#define _PORTENTA_H7_AWS_LOGLEVEL_ 4

#define USE_ETHERNET_PORTENTA_H7 true

Expand Down Expand Up @@ -118,8 +118,10 @@ void setup()

// Use Static IP
//Ethernet.begin(mac[index], ip);
//Ethernet.begin(ip);
// Use DHCP dynamic IP and random mac
Ethernet.begin(mac[index]);
//Ethernet.begin(mac[index]);
Ethernet.begin();

if (Ethernet.hardwareStatus() == EthernetNoHardware)
{
Expand Down Expand Up @@ -195,5 +197,5 @@ void check_status()

void loop()
{
check_status();
//check_status();
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void drawGraph(AsyncWebServerRequest *request)
{
String out;

out.reserve(3000);
out.reserve(4000);
char temp[70];

out += "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"310\" height=\"150\">\n";
Expand Down

0 comments on commit f934df6

Please sign in to comment.