@@ 34-43 (lines=10) @@ | ||
31 | } |
|
32 | } |
|
33 | ||
34 | private function _voltage() |
|
35 | { |
|
36 | $volt = null; |
|
37 | if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now', $volt, 0, 4096, false) && !is_null($volt) && (trim($volt) != "")) { // Banana Pi |
|
38 | $dev = new SensorDevice(); |
|
39 | $dev->setName("Voltage 1"); |
|
40 | $dev->setValue($volt / 1000000); |
|
41 | $this->mbinfo->setMbVolt($dev); |
|
42 | } |
|
43 | } |
|
44 | ||
45 | private function _current() |
|
46 | { |
|
@@ 45-54 (lines=10) @@ | ||
42 | } |
|
43 | } |
|
44 | ||
45 | private function _current() |
|
46 | { |
|
47 | $current = null; |
|
48 | if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now', $current, 0, 4096, false) && !is_null($current) && (trim($current) != "")) { // Banana Pi |
|
49 | $dev = new SensorDevice(); |
|
50 | $dev->setName("Current 1"); |
|
51 | $dev->setValue($current / 1000000); |
|
52 | $this->mbinfo->setMbCurrent($dev); |
|
53 | } |
|
54 | } |
|
55 | ||
56 | public function build() |
|
57 | { |