Skip to content

Commit 629e92a

Browse files
committed
Misc optimizations
1 parent 07a5d74 commit 629e92a

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

install/batt-info.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ batt_info() {
1212

1313
# calculator
1414
calc2() {
15-
awk "BEGIN {print $*}" | tr , . | xargs printf %.2f
15+
awk "BEGIN {print $*}" | tr , . | xargs printf %.2f | sed -E 's/0+$//; s/\.$//'
1616
}
1717

1818

install/misc-functions.sh

+4-8
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ at() {
7777

7878

7979
calc() {
80-
awk "BEGIN {print $*}" | tr , .
80+
awk "BEGIN {print $*}" | tr , . | sed -E 's/0+$//; s/\.$//'
8181
}
8282

8383

@@ -324,13 +324,9 @@ invalid_switch() {
324324

325325

326326
log_on() {
327-
if [ -f ${log:-//} ]; then
328-
if [[ $log = */accd-* ]]; then
329-
set -x
330-
else
331-
set -x 2>>$log
332-
fi
333-
fi
327+
[ ! -f ${log:-//} ] || {
328+
[[ $log = */accd-* ]] && set -x || set -x 2>>$log
329+
}
334330
}
335331

336332

module.prop

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
id=acc
22
domain=vr25
33
name=Advanced Charging Controller (ACC)
4-
version=v2024.5.11.1-rc
5-
versionCode=202405111
4+
version=v2024.6.2-rc
5+
versionCode=202406020
66
author=VR25
77
description=Extend your battery's service life by controlling charging current, temperature, and voltage. Any root solution is supported. The installation is always "systemless". Works on Android and KaiOS.
88
updateJson=https://raw.githubusercontent.com/VR-25/acc/master/module.json

0 commit comments

Comments
 (0)