Skip to content

Commit f97efab

Browse files
committed
Merge branch 'core3fix' into main
2 parents 4c5175f + b11f5e7 commit f97efab

File tree

6 files changed

+10
-126
lines changed

6 files changed

+10
-126
lines changed

EmbUI/EmbUI.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
#include "EmbUI.h"
77
#include "ui.h"
88

9-
#ifdef EMBUI_DEBUG
10-
#include "MemoryInfo.h"
11-
#endif
12-
13-
149
// Update defs
1510
#ifndef ESP_IMAGE_HEADER_MAGIC
1611
#define ESP_IMAGE_HEADER_MAGIC 0xE9
@@ -205,7 +200,7 @@ void EmbUI::begin(){
205200
String out = String(F("Heap: "))+String(ESP.getFreeHeap());
206201
#ifdef EMBUI_DEBUG
207202
#ifdef ESP8266
208-
out += String(F("\nFrac: ")) + String(getFragmentation());
203+
out += String(F("\nFrac: ")) + String(ESP.getHeapFragmentation());
209204
#endif
210205
out += String(F("\nClient: ")) + String(ws.count());
211206
#endif

EmbUI/MemoryInfo.cpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

EmbUI/MemoryInfo.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

EmbUI/Ports/MemoryInfo.Avr.cpp

Lines changed: 0 additions & 61 deletions
This file was deleted.

EmbUI/Ports/MemoryInfo.Esp8266.cpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

EmbUI/timeProcessor.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@
1010
#include <TZ.h> // TZ declarations https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h
1111
#include <sntp.h>
1212
#include <ESP8266HTTPClient.h>
13+
14+
#ifdef __NEWLIB__
15+
#if __NEWLIB__ >= 4
16+
extern "C" {
17+
#include <sys/_tz_structs.h>
18+
};
19+
#endif
20+
#endif
1321
#endif
1422

1523
#ifdef ESP32
1624
#include <time.h>
1725
#include <lwip/apps/sntp.h>
1826
#include <HTTPClient.h>
19-
//extern "C" void setTimeZone(long offset, int daylight = 0);
2027
#endif
2128

2229
#ifndef TZONE
@@ -31,7 +38,7 @@ TimeProcessor::TimeProcessor()
3138
//configTzTime(); for esp32 https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-time.c
3239

3340
#ifdef ESP8266
34-
settimeofday_cb(std::bind(&TimeProcessor::timeavailable, this));
41+
settimeofday_cb( [this]{ timeavailable();} );
3542
#endif
3643

3744
/*

0 commit comments

Comments
 (0)