dslik / powersim

Electrical power generation, distribution and consumption simulator
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add heap monitoring #4

Open dslik opened 11 months ago

dslik commented 11 months ago

Add sensors for monitoring total/available heap.

LGPL code for obtaining this information: https://github.com/earlephilhower/arduino-pico/blob/3778fbb833918c9a09433f85785456ec074edb22/cores/rp2040/RP2040Support.h#L227-L239

dslik commented 11 months ago

Here's an MIT licensed variant: https://github.com/CHiPs44/hagl_pico_vgaboard/blob/main/example/specs.c#L62

And the forums post where it is attributed to: https://forums.raspberrypi.com/viewtopic.php?t=347638#p2082565

dslik commented 11 months ago

Verified MIT license compatibility with BSD. Will include in a separate file.

dslik commented 11 months ago

Command line added.

Next step is to add a sensor.