Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ extended-description = """
silod is a minimal Rust daemon for embedded Linux that listens to kernel
uevents from the TS-SILO super-capacitor driver. It applies user-specified
charging limits, runs hook scripts on power events, and initiates a clean
shutdown when capacity reaches a critical threshold.
shutdown when power has failed and capacity is below a critical threshold.
"""

section = "utils"
priority = "optional"
systemd-units = { enable = true, restart-after-upgrade = true }
assets = [
["target/release/silod", "usr/bin/", "755"],
["target/release/silod", "usr/sbin/", "755"],
["silo.toml.example", "etc/silod/silo.toml", "644"],
]
conf-files = ["/etc/silod/silo.toml"]
2 changes: 1 addition & 1 deletion debian/service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/silod
ExecStart=/usr/sbin/silod
Restart=always
User=root
Group=root
Expand Down
2 changes: 1 addition & 1 deletion src/supply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl Supply {
let res = self.sysfs_write_u32(key, value);
self.log_attr_result(key, value, res);
} else if let Some(startup_charge_current_pct) = cfg.startup_charge_current_pct {
let max_ma = self.sysfs_read_u32("charge_current_max")?;
let max_ma = self.sysfs_read_u32("constant_charge_current_max")?;
let key = "startup_charge_current_ma";
let value = (startup_charge_current_pct.saturating_mul(max_ma) / 100).clamp(0, max_ma);
let res = self.sysfs_write_u32(key, value);
Expand Down
Loading