Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 4595b62

Browse files
Fixed #356; SystemInfoProvider CPU temperature was divided by 1000 on OrangePi
1 parent 29c1817 commit 4595b62

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Copyright (C) 2012-2017 Pi4J
8181
* Fixed #351; Pi4J packages excluded in OSGI manifest ImportPackage declaration
8282
* Fixed #360; Serial.setBreak(TRUE|FALSE) is printing debug lines to stdout
8383
* Fixed #355; ButtonBase Executor Service should be closed on GpioController.shutdown()
84+
* Fixed #356; SystemInfoProvider CPU temperature was divided by 1000 on OrangePi
8485

8586
## RELEASES
8687

pi4j-core/src/main/java/com/pi4j/system/impl/OrangePiSystemInfoProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public SystemInfo.BoardType getBoardType() throws IOException, InterruptedExcept
5555
public float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException, UnsupportedOperationException {
5656
try(BufferedReader br = new BufferedReader(new FileReader("/sys/devices/virtual/thermal/thermal_zone0/temp"))) {
5757
for(String line; (line = br.readLine()) != null; ) {
58-
return Float.parseFloat(line) / 1000;
58+
return Float.parseFloat(line);
5959
}
6060
}
6161
throw new UnsupportedOperationException();

0 commit comments

Comments
 (0)