Updated the test header as well as other small things

This commit is contained in:
anschrammh 2020-12-12 11:15:07 +01:00
parent 0ead1e5600
commit 9db06f5be6
2 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,8 @@
/** /**
* This sketch was written in order to test the List and Queue datastructures used in my project * This sketch was written in order to test the List and Queue datastructures used in my project
* This test was aimed toward spotting memory leaks * This test was aimed toward spotting memory leaks
* Anatole SCHRAMM-HENRY 08/05/2019 * Created by Anatole SCHRAMM-HENRY the 08/05/2019
* Updated the 12/12/2020
*/ */
#include "D:/Users/Think/Desktop/Mes documents/Programmation/Arduino/ESP8266_swiss_army_board/src/app/List.h" #include "D:/Users/Think/Desktop/Mes documents/Programmation/Arduino/ESP8266_swiss_army_board/src/app/List.h"
@ -20,15 +21,15 @@ void setup() {
void loop() { void loop() {
// put your main code here, to run repeatedly: // put your main code here, to run repeatedly:
strList.addFirst(String("Vive l'esp")); strList.addFirst(String("This is a test string"));
strList.addLast(strList.removeFirstRef()); strList.addLast(strList.removeFirstRef());
strList.addFirst(strList.removeLastRef()); strList.addFirst(strList.removeLastRef());
strList.addLast(String("Vive l'esp")); strList.addLast(String("This is a test string"));
strQueue.add(String("Meme pas vrai")); strQueue.add(String("An other test string"));
delete strQueue.removeRef(); delete strQueue.removeRef();
strQueue.add(String("Meme pas vrai")); strQueue.add(String("An other test string"));
strQueue.remove(); strQueue.remove();
if(millis() - timer >= 1000) if(millis() - timer >= 1000)
{ {
@ -36,13 +37,12 @@ void loop() {
timer = millis(); timer = millis();
} }
if(strList.count() > 20) if(strList.count() > 500)
{ {
//Serial.println("Cleared"); Serial.println("Cleared");
strList.clear(); strList.clear();
} }
strList.removeFirst(); strList.removeFirst();
} }

View File

@ -1,6 +1,6 @@
/** /**
* This sketch was written in order to developp and test the multi-client tcp server which will later be used in my project * This sketch was written in order to developp and test the multi-client tcp server which will later be used in my project
* Anatole SCHRAMM-HENRY 08/05/2019 * Created by Anatole SCHRAMM-HENRY the 08/05/2019
*/ */
#include "TCPClient.h" #include "TCPClient.h"
@ -27,7 +27,7 @@ void setup() {
disconnectedEventHandler = WiFi.onStationModeDisconnected(&(lostCon)); disconnectedEventHandler = WiFi.onStationModeDisconnected(&(lostCon));
WiFi.persistent(false); WiFi.persistent(false);
WiFi.begin("freebox_Henry","eustache1930"); WiFi.begin("SSID","PASSWORD");
} }
void debugInfo() void debugInfo()