Skip to content

Add validation for the percentage values#228

Closed
ratonalgaze wants to merge 1 commit intoactuallymentor:mainfrom
ratonalgaze:bugfix/210-battery-level-can-be-set-to-more-than-100-percent
Closed

Add validation for the percentage values#228
ratonalgaze wants to merge 1 commit intoactuallymentor:mainfrom
ratonalgaze:bugfix/210-battery-level-can-be-set-to-more-than-100-percent

Conversation

@ratonalgaze
Copy link
Copy Markdown

The valid percentage values are 0-100.
The script will exit if the value is invalid for "charge" and "discharge" commands and will apply additional validation for the other two valid values for the "maintain" command.

Closes #210

The valid percentage values are 0-100.
The script will exit if the value is invalid for "charge" and "discharge" commands and will apply additional validation for the other two valid values for the "maintain" command.
@actuallymentor
Copy link
Copy Markdown
Owner

Ah I just merged #233 that aims to fix the same. Do you agree with the solution in that PR as well @ksgubanov?

@ratonalgaze
Copy link
Copy Markdown
Author

@actuallymentor #233 adds validation only for the 'charge' command and doesn't validate input of the 'discharge' and 'maintain'.

@thdrmrphy thdrmrphy mentioned this pull request Apr 5, 2024
@ratonalgaze
Copy link
Copy Markdown
Author

Closed in favor of #253

@ratonalgaze ratonalgaze closed this May 7, 2024
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.

Battery level can be set to more than 100%

2 participants