platform: provide free ram metrics
This commit is contained in:
parent
2a602225d2
commit
56e2e76954
@ -68,6 +68,14 @@ Platform::version()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
Platform::freeRam()
|
||||||
|
{
|
||||||
|
#ifdef BOARD_ESP8266
|
||||||
|
return ESP.getFreeHeap();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Platform::preSetup()
|
Platform::preSetup()
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@ class Platform : public Task {
|
|||||||
void loop() override;
|
void loop() override;
|
||||||
static bool getLocalTime(struct tm* timedata);
|
static bool getLocalTime(struct tm* timedata);
|
||||||
static const char* deviceID();
|
static const char* deviceID();
|
||||||
|
static int freeRam();
|
||||||
|
|
||||||
struct TaskRegistration {
|
struct TaskRegistration {
|
||||||
Task* task = 0;
|
Task* task = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user