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