Skip to content

Commit

Permalink
Merge pull request #15 from sacconazzo:develop
Browse files Browse the repository at this point in the history
temp pi GPU e CPU
  • Loading branch information
sacconazzo authored Sep 1, 2024
2 parents 8a0f3f1 + 8a2b4a5 commit 1f802ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gpio",
"version": "1.1.2",
"version": "1.1.3",
"description": "rpi battery signals",
"scripts": {
"db:prepare": "npx knex migrate:latest",
Expand Down
10 changes: 7 additions & 3 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ const share = async () => {
try {
const system = {
uptime: execSync("uptime").toString(),
temp: Number(
execSync("vcgencmd measure_temp").toString().split("=")[1].split("'")[0]
),
tempGpu: execSync("vcgencmd measure_temp")
.toString()
.split("=")[1]
.split("'")[0],
tempCpu: (
execSync("cat /sys/class/thermal/thermal_zone0/temp").toString() / 1000
).toFixed(1),
};

const dayWeek = await db.dayWeek();
Expand Down

0 comments on commit 1f802ab

Please sign in to comment.