Skip to content
Snippets Groups Projects
Verified Commit 9ae249a5 authored by Legy (Beini)'s avatar Legy (Beini)
Browse files

Fix batteryImportance ligic being backwards

parent 237156c5
No related branches found
No related tags found
No related merge requests found
...@@ -122,10 +122,10 @@ batteryBlockOutput isPlugged bs = (shortText.~shortText') . createBlock <$> full ...@@ -122,10 +122,10 @@ batteryBlockOutput isPlugged bs = (shortText.~shortText') . createBlock <$> full
batteryImportance :: [BatteryState] -> Importance batteryImportance :: [BatteryState] -> Importance
batteryImportance batteryStates batteryImportance batteryStates
| percentage < 10 = percentage / 10 + 3 | percentage < 10 = 4 - percentage / 10
| percentage < 35 = (percentage - 10) / 25 + 2 | percentage < 35 = 3 - (percentage - 10) / 25
| percentage < 75 = (percentage - 35) / 40 + 1 | percentage < 75 = 2 - (percentage - 35) / 40
| otherwise = (percentage - 75) / 25 + 0 | otherwise = 1 - (percentage - 75) / 25
where where
percentage :: Float percentage :: Float
percentage = batteryPercentage batteryStates percentage = batteryPercentage batteryStates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment