Skip to content

Commit

Permalink
fix build warnings and errors in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
rob040 committed Jan 6, 2024
1 parent 5873e82 commit 5b6485b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions examples/customHTML/customHTML.ino
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool loadOptions() {
Serial.println();
Serial.printf("LED pin value: %d\n", ledPin);
Serial.printf("Bool value: %d\n", boolVar);
Serial.printf("Long value: %ld\n",longVar);
Serial.printf("Long value: %ld\n",(long) longVar);
Serial.printf("Float value: %d.%d\n", (int)floatVar, (int)(floatVar*1000)%1000);
Serial.println(stringVar);
return true;
Expand Down Expand Up @@ -170,7 +170,7 @@ void setup() {
myIP = WiFi.softAPIP();
captiveRun = true;
}

// Add custom page handlers to webserver
server.on("/reload", HTTP_GET, handleLoadOptions);

Expand Down Expand Up @@ -209,9 +209,9 @@ void setup() {
server.addJavascript(custom_script, "fetch", /*overwite file*/ false);
server.addJavascript(thingsboard_script, "ts", /*overwite file*/ false);

Add custom page title to /setup
// Add custom page title to /setup
server.setSetupPageTitle("Test setup page");
Add custom logo to /setup page with custom size
// Add custom logo to /setup page with custom size
server.setLogoBase64(base64_logo, "128", "128", /*overwite file*/ true);

// Enable ACE FS file web editor and add FS info callback fucntion
Expand All @@ -223,7 +223,7 @@ void setup() {
// Start server
if (server.init()) {
Serial.print(F("\n\nWeb Server started on IP Address: "));
Serial.println(myIP);
Serial.println(myIP);
Serial.println(F(
"This is \"customHTML.ino\" example.\n"
"Open /setup page to configure optional parameters.\n"
Expand Down
2 changes: 1 addition & 1 deletion examples/highcharts/highcharts.ino
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void loop() {
doc["maxBlock"] = heap_caps_get_largest_free_block(0);
#elif defined(ESP8266)
uint32_t free;
uint16_t max;
uint32_t max;
ESP.getHeapStats(&free, &max, nullptr);
doc["totalHeap"] = free;
doc["maxBlock"] = max;
Expand Down
2 changes: 1 addition & 1 deletion examples/remoteOTA/remoteOTA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void setup(){

// Try to connect to flash stored SSID, start AP if fails after timeout
IPAddress myIP = server.startWiFi(30000, "ESP_AP", "123456789" );

(void) myIP; // return value is not used
// WiFi.persistent(true);
// WiFi.begin("PuccosNET", "Tole76tnt");
// uint32_t beginTime = millis();
Expand Down

0 comments on commit 5b6485b

Please sign in to comment.