Start supporting dict and json types.
This commit is contained in:
parent
94fcc42aed
commit
5183aa821a
32 changed files with 288 additions and 247 deletions
11
src/base/device/power/Battery.cpp
Normal file
11
src/base/device/power/Battery.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "Battery.h"
|
||||
|
||||
#include "File.h"
|
||||
|
||||
String Battery::get_capacity()
|
||||
{
|
||||
String content;
|
||||
File f("/sys/class/power_supply/BAT1/capacity");
|
||||
f.readText(content);
|
||||
return content;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue