Add battery min/max discharge rate and wear level#1660
Conversation
| if (Math.Abs(status.Rate) > Math.Abs(MaxDischargeRate)) | ||
| MaxDischargeRate = status.Rate; | ||
|
|
||
| if (status.Rate == 0) |
There was a problem hiding this comment.
When the machine isn't charging: which means, status.Rate == 0, calculating min rate & max rate shouldn't be necessary. I think the order here should be changed, although it won't break anything.
|
As said, codes look good to me. One personal suggestion, whould it be better if we change min & max discharge rate into a discharge rate range? It saves one line space, and shows excatly the same thing. |
BartoszCichecki
left a comment
There was a problem hiding this comment.
This isn’t acceptable in current state.
First of all: battery discharge rate in not refreshed in background. It will only refresh now when:
- Hwinfo integration is enabled (also in background)
- Battery page is displayed
- You hover over tray icon
Because of this, min max is not going to be displayed correctly. It also needs to reset when charger is plugged in.
Wear level should be reversed: people are more used battery health.
Right, it could be because of the order of calculating min/max and |
Thanks for pointing this out, Hwinfo integration is disable on me, and not running in background as well. I did check the code at Hwinfo integration, and it seems to just only call for Battery Temp in background? I'm not sure if making discharge rate refresh in background will change much in current code, but I'll see what I can do. Personally, I'm good with current one, even if it's not refresh in background, it's the same as when I want to see discharge rate, either open Battery page or hover tray icon, for tray icon I need to hover it again to get new discharge rate value. I will also change wear level to battery health. |
If I get this right, you mean it should be like this
I think it's okay if it's on Battery page, for tray icon it might be horizontally too long, and should be keep as 2 separate min/max discharge rate. Which will cause inconsistency with one on Battery page🤔. |
|
These changes includes:
|


Added features:
Personally, I do monitor battery when off the wall a lots, so these changes would save me few steps from calculating them on my own.