Skip to content

Commit

Permalink
Merge branch 'release/v1.7.3'
Browse files Browse the repository at this point in the history
# Conflicts:
#	library.json
  • Loading branch information
matteocarnelos committed Oct 11, 2022
2 parents 6e8ec28 + 2bfabc5 commit dbf7bec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SailtrackModule",
"version": "1.7.2",
"version": "1.7.3",
"description": "Base library required for all SailTrack's ESP32-based modules.",
"keywords": "sailtrack, module, sailing",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/SailtrackModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ void SailtrackModule::statusTask(void * pvArguments) {
JsonObject cpu = doc.createNestedObject("cpu");
cpu["temperature"] = temperatureRead();
JsonObject heap = doc.createNestedObject("heap");
heap["load"] = (float) ESP.getFreeHeap() / (float) ESP.getHeapSize();
heap["load"] = 1 - (float) ESP.getFreeHeap() / (float) ESP.getHeapSize();
heap["maxAlloc"] = ESP.getMaxAllocHeap();
if (ESP.getPsramSize()) {
JsonObject psram = doc.createNestedObject("psram");
psram["load"] = (float) ESP.getFreePsram() / (float) ESP.getPsramSize();
psram["load"] = 1 - (float) ESP.getFreePsram() / (float) ESP.getPsramSize();
psram["maxAlloc"] = ESP.getMaxAllocPsram();
}
publish(topic, doc.as<JsonObjectConst>());
Expand Down

0 comments on commit dbf7bec

Please sign in to comment.