Ira Abramov
f42628e609
feat: add percentage range support to maintain command
...
- Add valid_percentage_range() validation function
- Validates NUMBER-NUMBER format
- Ensures lower < upper
- Enforces lower >= 10 and upper <= 100
- No maximum range spread limit
- Update maintain_synchronous to handle ranges
- Parse range into lower_bound and upper_bound
- Enable charging when battery < lower_bound
- Disable charging when battery >= upper_bound
- Fully backward compatible with single values
- Update help message and README
- Add examples: 'battery maintain 70-80'
- Document range syntax alongside single values
- Maintain daemon persists ranges across reboots
- Stores range format (e.g., '70-80') in maintain.percentage
- Recovery logic auto-detects and restores ranges
Tested:
- Single value (80) works as before
- Valid ranges (70-80) work correctly
- Invalid ranges rejected (80-70, 5-15, 95-105, 70-70)
- Status display shows ranges properly (70% - 80%)
CLI-only feature. GUI support deferred to future work.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-10-21 13:10:08 +03:00
Alex Karpitski
184c1ad170
increment version
2024-07-08 12:05:03 +02:00
Alex Karpitski
6d624a1a5b
🐛 first check for recover setting, then valid_percentage
2024-07-08 11:53:01 +02:00
Mentor
27c55c7396
🐛 fix issue where "stop" did not reenable charging
2024-07-01 10:24:57 +02:00
Rene
2c29c44a83
increase version
2024-06-30 21:48:55 +02:00
Rene
f04f9113d7
fix whitespaces
2024-06-30 10:10:17 +02:00
Rene
3ad9113bdd
bugfix and refactoring
2024-06-30 10:02:57 +02:00
Mentor
affb7f029e
🐛 permissions bugfix
2024-06-28 12:27:07 +02:00
Mentor
6e3a6400bd
✨ new GUI release
2024-06-28 12:06:10 +02:00
Mentor
1e0094adc6
🐛 Fix validation typo
2024-06-28 11:36:34 +02:00
Mentor
dc5642d9d2
🐛 Fix validation typo
2024-06-28 11:36:27 +02:00
Mentor
0be64aeb33
🐛 fix syntax errors introduced in pull request merged
2024-06-28 11:30:00 +02:00
Mentor Palokaj
1a58456774
Merge branch 'main' into general_bugfixes
2024-06-28 11:16:23 +02:00
Mentor Palokaj
9070edfa98
Merge branch 'main' into main
2024-06-28 11:10:30 +02:00
Mentor Palokaj
43b369e6db
Merge pull request #184 from ibrado/enhancement/check-ac
...
Update MagSafe LED if threshold reached when AC charger is connected
2024-06-28 11:07:17 +02:00
Mentor Palokaj
35d6e1c3f1
Merge pull request #224 from rguca/voltage_limit
...
Voltage limit
2024-06-28 11:05:51 +02:00
Rene
af2e61ebc4
remove testing code
2024-06-19 22:11:26 +02:00
Rene
827f271eb6
added voltage maintenance to daemon
2024-06-19 22:07:09 +02:00
Rene
fa2028d2e3
add support for ',' decimal seperator
2024-06-19 17:20:14 +02:00
Rene
f50bad8f3c
fix brackets
2024-06-19 17:20:14 +02:00
Rene
e025614d26
voltage limit draft
2024-06-19 17:20:14 +02:00
Nicola De Rosa
2a4ba9ff9f
Merge branch 'actuallymentor:main' into main
2024-04-26 12:34:31 +02:00
Christoph
5f8210030c
fixes several issues
...
fixes battery not found if not running in path
fixes validate_percentage and rename to valid_percentage
removes in
2024-04-21 16:38:46 +02:00
Theodore Murphy
a316b556aa
Not sure what this commit's doing ¯\_(ツ)_/¯
2024-04-05 17:49:03 +11:00
Theodore Murphy
9a4f4f302c
Merge pull request #2 from thdrmrphy/accuracy-fix
...
Apply accuracy-fix changes to bugfixes
2024-03-28 12:30:15 +11:00
Theodore Murphy
51a797ad2f
Sorry to bunch all of this into one commit! Lots of changes trying to debug, better logging, etc. Will revert some of it.
2024-03-28 12:10:16 +11:00
Theodore Murphy
5a028d0d35
Fix with new function
2024-03-28 11:26:08 +11:00
Theodore Murphy
e404c0219f
End eternal loop from battery charging on command
2024-03-28 11:25:11 +11:00
Theodore Murphy
51304aa9de
Use validation PR from upstream
2024-03-28 11:19:17 +11:00
Chris Lasher
cc0ecbcba2
Reorder paths.
2024-03-24 14:58:32 -04:00
Theodore Murphy
afe19c53a0
Bug fix
...
Remove accidental `fi`
2024-03-24 10:09:59 +11:00
Theodore Murphy
85d6fd0b57
Merge branch 'actuallymentor:main' into accuracy-fix
2024-03-24 09:54:18 +11:00
Mentor Palokaj
481610ac05
Merge pull request #233 from lodewijkvankeizerswaard/checkchargeargs
...
Fix for #104 : added integer check for charge command argument
2024-03-23 12:26:59 +01:00
Theodore Murphy
dc223842ee
Sleeps for 20 instead of 60 within 3%
2024-03-03 16:01:25 +11:00
Theodore Murphy
2095d20f32
Fix bug
2024-02-24 18:38:58 +11:00
Theodore Murphy
399001278c
Add files via upload
2024-02-22 18:06:15 +11:00
lodewijkvankeizerswaard
2fe4a393f5
cleared up logging message
2024-02-13 12:29:53 +01:00
lodewijkvankeizerswaard
5f1a10332f
cleared up logging message
2024-02-13 12:25:47 +01:00
lodewijkvankeizerswaard
eab626ac91
added integer check for charge command argument
2024-02-13 12:16:20 +01:00
Nicola De Rosa
acc0322d6d
Fix
2024-01-21 00:58:45 +01:00
Nicola De Rosa
2634691879
Indentation fix
2024-01-21 00:52:08 +01:00
Nicola De Rosa
13159c75f7
Recovered Right files
2024-01-21 00:50:22 +01:00
Nicola De Rosa
6021aa9d49
Calibration Stop
2024-01-17 16:23:44 +01:00
Nicola De Rosa
5cfb2b3686
Merge branch 'actuallymentor:main' into main
2024-01-17 12:56:29 +01:00
Nicola De Rosa
5883bbe70c
Style Fix
2024-01-17 12:55:57 +01:00
Mentor
0c48dc0543
🐛 add redundant homebrew paths
2024-01-17 12:09:30 +01:00
Mentor Palokaj
cc936c71e9
Merge pull request #207 from maxtacu/main
...
fix adapter action
2024-01-17 11:37:34 +01:00
Chris Lasher
72aa7324ba
Fix the paths for homebrew.
2023-12-11 12:18:56 -05:00
Maxim Tacu
ada960be56
fix adapter action
2023-12-04 22:29:35 +00:00
Alex Ibrado
7977d5f874
Disable charging only if enabled
2023-09-19 08:14:19 +08:00