Repository navigation
Conversation
Pull request to add ev3dev-powerinfo script to repository. [Reference](ev3dev/ev3dev#1035)
| printf "%-20s: %3d.%03d V\n" "Voltage" $intVolts $decmiliVolts | ||
|
|
||
|
|
||
| uAmps=`cat $pwr_supply/current_now` |
There was a problem hiding this comment.
Only EV3 can measure current. This will cause an error on other devices.
There was a problem hiding this comment.
Oops. I didn't know that.
There was a problem hiding this comment.
Given this limitation, is it better that I just close the pull request?
There was a problem hiding this comment.
I guess it is up to you if you want to fix it or not. 😄
There was a problem hiding this comment.
It is easy enough to wrap this section in:
if [ -e "$pwr_supply/current_now" ]; then
...
fi
| printf "\n" | ||
| print_val "/sys/class/power_supply info" | ||
| for pwr_supply in /sys/class/power_supply/*; do | ||
| cat $pwr_supply/uevent |
There was a problem hiding this comment.
I wasn't sure that my unit conversion algorithm was correct when I first wrote it. In addition, I thought some of the raw info may be relevant but was too lazy to convert it to a human readable format.
There was a problem hiding this comment.
maybe we just keep it super simple and make the whole script something like this:
for pwr_supply in /sys/class/power_supply/*; do
cat $pwr_supply/uevent
echo
done
|
I'm closing this since this patch has too many issues. Please see pull request #8 |
Pull request to add ev3dev-powerinfo script to repository.
Referenced ev3dev issue #1035