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

Commit

Permalink
v1.2.0 to save heap when sending large data
Browse files Browse the repository at this point in the history
### Release v1.2.0

1. Support using `CString` to save heap to send `very large data`. Check [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](khoih-prog/Portenta_H7_AsyncWebServer#8)
2. Add multiple examples to demo the new feature
  • Loading branch information
khoih-prog committed Oct 3, 2022
1 parent c1ae603 commit 9075cb4
Show file tree
Hide file tree
Showing 37 changed files with 1,838 additions and 176 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Arduino IDE version: 1.8.19
RP2040 core v2.5.4
RASPBERRY_PI_PICO_W Module
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while using Async_AdvancedWebServer
I encountered a crash while using this library
Steps to reproduce:
1. ...
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Release v1.2.0](#Release-v120)
* [Release v1.1.2](#Release-v112)
* [Release v1.1.1](#Release-v111)
* [Release v1.1.0](#Release-v110)
Expand All @@ -24,6 +25,11 @@

## Changelog

### Release v1.2.0

1. Support using `CString` to save heap to send `very large data`. Check [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8)
2. Add multiple examples to demo the new feature

### Release v1.1.2

1. Add functions and example `Async_AdvancedWebServer_favicon` to support `favicon.ico`
Expand Down
5 changes: 3 additions & 2 deletions examples/Async_AdvancedWebServer/Async_AdvancedWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void handleRoot(AsyncWebServerRequest *request)
snprintf(temp, BUFFER_SIZE - 1,
"<html>\
<head>\
<meta http-equiv='refresh' content='5'/>\
<meta http-equiv='refresh' content='60'/>\
<title>AsyncWebServer-%s</title>\
<style>\
body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }\
Expand Down Expand Up @@ -146,6 +146,7 @@ void drawGraph(AsyncWebServerRequest *request)
out += temp;
y = y2;
}

out += "</g>\n</svg>\n";

request->send(200, "image/svg+xml", out);
Expand Down Expand Up @@ -181,7 +182,7 @@ void setup()
digitalWrite(LED_BUILTIN, LED_OFF);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

delay(200);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void handleRoot(AsyncWebServerRequest *request)
snprintf(temp, BUFFER_SIZE - 1,
"<html>\
<head>\
<meta http-equiv='refresh' content='5'/>\
<meta http-equiv='refresh' content='60'/>\
<title>AsyncWebServer-%s</title>\
<style>\
body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }\
Expand Down Expand Up @@ -183,7 +183,7 @@ void setup()
digitalWrite(LED_BUILTIN, LED_OFF);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

delay(200);

Expand Down
Loading

0 comments on commit 9075cb4

Please sign in to comment.