[GH-ISSUE #1176] using code folder function in "AutoConnectWithFSParameters" #1005

Closed
opened 2026-02-28 01:28:05 +03:00 by kerem · 1 comment
Owner

Originally created by @daniele0354 on GitHub (Dec 16, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1176

Please forget this item because I did test it using the Linux environment and this problem doesn't appear.
In any case, this is a real mistake of the Windows compiler

Basic Infos

WiFimanager functions implementation

Hardware

WiFimanager Branch/Release:

  • Master
  • [ x] Development

Esp8266/Esp32:

  • [x ] ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

using WiFiManager Example in my project
Problem description
I wish to use the AutoConnectWith..example in my sketch. In my original sketch, I wish to implement the wifimanager functionality because I want to define the parameter on the field. I did and tested my sketch and it works. I tested one of the examples for e.g AutoConnectWithFSParameters and it works. when I merge the functionalities I get errors. the first one has been the stack dumps.
looking to the AutoConn... I've seen that collecting the rows using the Code Folding function in the void setup() postion, the Void Loop() function disappear as well it belongs to the void setup() function.
like this :
#include <FS.h> //this needs to be first, or it all crashes and burns...
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager

#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson

//define your default values here, if there are different values in config.json, they are overwritten.
char mqtt_server[40];
char mqtt_port[6] = "8080";
char blynk_token[34] = "YOUR_BLYNK_TOKEN";

//flag for saving data
bool shouldSaveConfig = false;

//callback notifying us of the need to save config
void saveConfigCallback () {
Serial.println("Should save config");
shouldSaveConfig = true;
}
// here I collect the row with the code folding
void setup() {


instead of like this is in the normal building :


void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:

}


I tried my opinion that the mistake bor from the JSON functionality.
I thought that because using this: rk-git.de/rolfwedermann/ESPAsyncWiFiManager@69e4b9b16f/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino
the code folding problem doesn't appear, but move from JSON 5 to 6 is not so easy as Blanchon says

I looked for this item in the archive, but I've not found any talk.
I hope to be clear in my talk

Many thanks for the attention and first for what you did.
All the best
Daniele

Settings in IDE

Module: ESP8266

Additional libraries:

Sketch


no #include <Arduino.h>

void setup() {

}

void loop() {

}

Debug Messages

messages here
Originally created by @daniele0354 on GitHub (Dec 16, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1176 Please forget this item because I did test it using the Linux environment and this problem doesn't appear. In any case, this is a real mistake of the Windows compiler ### Basic Infos WiFimanager functions implementation #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [ x] Development **Esp8266/Esp32:** - [x ] ESP8266 - [ ] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [ ] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [ ] staging (master/dev) ### Description using WiFiManager Example in my project Problem description I wish to use the AutoConnectWith..example in my sketch. In my original sketch, I wish to implement the wifimanager functionality because I want to define the parameter on the field. I did and tested my sketch and it works. I tested one of the examples for e.g AutoConnectWithFSParameters and it works. when I merge the functionalities I get errors. the first one has been the stack dumps. looking to the AutoConn... I've seen that collecting the rows using the Code Folding function in the void setup() postion, the Void Loop() function disappear as well it belongs to the void setup() function. like this : #include <FS.h> //this needs to be first, or it all crashes and burns... #include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino //needed for library #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> //https://github.com/tzapu/WiFiManager #include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson //define your default values here, if there are different values in config.json, they are overwritten. char mqtt_server[40]; char mqtt_port[6] = "8080"; char blynk_token[34] = "YOUR_BLYNK_TOKEN"; //flag for saving data bool shouldSaveConfig = false; //callback notifying us of the need to save config void saveConfigCallback () { Serial.println("Should save config"); shouldSaveConfig = true; } // here I collect the row with the code folding void setup() { _________________________________________________________ instead of like this is in the normal building : - - - - void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: } _____________________________ I tried my opinion that the mistake bor from the JSON functionality. I thought that because using this: https://rk-git.de/rolfwedermann/ESPAsyncWiFiManager/blob/69e4b9b16fc98c4baf010d95a7c5ffe06a900299/examples/AutoConnectWithFSParameters/AutoConnectWithFSParameters.ino the code folding problem doesn't appear, but move from JSON 5 to 6 is not so easy as Blanchon says I looked for this item in the archive, but I've not found any talk. I hope to be clear in my talk Many thanks for the attention and first for what you did. All the best Daniele ### Settings in IDE Module: ESP8266 Additional libraries: ### Sketch ```cpp no #include <Arduino.h> void setup() { } void loop() { } ``` ### Debug Messages ``` messages here ```
kerem closed this issue 2026-02-28 01:28:05 +03:00
Author
Owner

@daniele0354 commented on GitHub (Dec 17, 2020):

Please forget this item because I did test it using the Linux environment and this problem doesn't appear.
In any case, this is a real mistake of the Windows compiler

<!-- gh-comment-id:747328761 --> @daniele0354 commented on GitHub (Dec 17, 2020): Please forget this item because I did test it using the Linux environment and this problem doesn't appear. In any case, this is a real mistake of the Windows compiler
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1005
No description provided.