-
Notifications
You must be signed in to change notification settings - Fork 15
Chargerate #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chargerate #117
Conversation
we should see if this updates the PMF frameworks correctly for the input current limit. Otherwise there might be a risk of brownout. especially on 16in. |
It doesn't. This is about the current going into the battery. Not the current limit from AC to the system. |
b35bca8
to
3365194
Compare
``` > sudo framework_tool --power Place your right index finger on the fingerprint reader Charger Status AC is: not connected Charger Voltage: 17048mV Charger Current: 0mA Chg Input Current:384mA Battery SoC: 93% Battery Status AC is: not connected Battery is: connected Battery LFCC: 3693 mAh (Last Full Charge Capacity) Battery Capacity: 3409 mAh 58.96 Wh Charge level: 92% Battery discharging ``` Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
3365194
to
1cf5d6f
Compare
Usually the user won't want to specify a mA value to limit the charge current. Setting a charge rate 0.0-1.0 is more useful. ``` PS C:\Users\Daniel\clone\framework-system-private> sudo .\target\debug\framework_tool.exe --power Charger Status AC is: connected Charger Voltage: 17800mV Charger Current: 2740mA 0.6998723C Chg Input Current:2848mA Battery SoC: 94% Battery Status AC is: connected Battery is: connected Battery LFCC: 4021 mAh (Last Full Charge Capacity) Battery Capacity: 3751 mAh 66.512 Wh Charge level: 93% Battery charging PS C:\Users\Daniel\clone\framework-system-private> sudo .\target\debug\framework_tool.exe --charge-rate-limit 0.5 Requested Rate: 0.5C Design Current: 3915mA Limiting Current to: 1957mA PS C:\Users\Daniel\clone\framework-system-private> sudo .\target\debug\framework_tool.exe --power Charger Status AC is: connected Charger Voltage: 17800mV Charger Current: 1956mA 0.49961686C Chg Input Current:2848mA Battery SoC: 94% Battery Status AC is: connected Battery is: connected Battery LFCC: 4021 mAh (Last Full Charge Capacity) Battery Capacity: 3754 mAh 66.584 Wh Charge level: 93% Battery charging ``` Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
|
||
/// Get or set max charge current limit | ||
#[arg(long)] | ||
#[clap(num_args = ..2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding correctly, I believe this limits the argument count to a max of 1, and if you want to allow 2, you need ..=2
instead, right? Same for charge rate limit. I mention this because I'm trying to use framework_tool v0.4 with --charge-rate-limit 60 0.7
(similar to the syntax given in the new examples) but I get a clap error, "unexpected argument '0.7' found". It does work with a single argument, but I wanted to use the conditional form with the second argument based on battery state of charge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right. Thanks!. #123
> sudo framework_tool --charge-rate-limit 80 0.8 | ||
> sudo framework_tool --charge-current-limit 80 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the limit (out of 1.0) is always required and the state of charge (out of 100) is optional, and in the code the limit is always first and the SoC is second (in an Option), so would that mean that this example has the arguments reversed? Sorry if I'm missing something obvious; I can't test it because of the issue in the other comment I'm leaving.
Resolves #13
Setting a custom charger current limit