Skip to content

Conversation

@0xa10
Copy link

@0xa10 0xa10 commented Jul 4, 2020

No description provided.

@0xa10 0xa10 force-pushed the multiple_batteries branch from ae76e6b to 794b1d1 Compare July 4, 2020 12:15
Comment on lines +78 to +84
for battery_path in ${battery_paths[@]}; do
battery_state=$(cat $battery_path/status)
if [[ $battery_state == "Charging" || $battery_full == "Full" ]]; then
BATT_CONNECTED=1
fi
battery_full=$battery_path/energy_full
battery_current=$battery_path/energy_now
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, quick question: Why did you remove the Arch Linux , Ubuntu and openSUSE checks? are these not necessary at all?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, i wasn’t sure about the differences in the first place, but on my test machines (Arch and Ubuntu) both paths were the same as the second case.

Comment on lines -90 to -94
if [ $battery_state == 'Discharging' ]; then
BATT_CONNECTED=0
else
BATT_CONNECTED=1
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do actually rely on this right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but now it defaults to 0 unless one of the batteries is indicating that it is charging or full

@0xa10 0xa10 requested a review from Goles July 7, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants