Compare commits
2 commits
0defdd78ad
...
c2598f3d26
Author | SHA1 | Date | |
---|---|---|---|
c2598f3d26 | |||
f29d4a2a92 |
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
loop {
|
||||
c += 1;
|
||||
let sys = System::new_all();
|
||||
let free_mem = sys.free_memory() / 1073741824;
|
||||
let free_mem = sys.available_memory() / 1073741824;
|
||||
let total_mem = sys.total_memory() / 1073741824;
|
||||
let cpu = sys.global_cpu_usage();
|
||||
let ip4 = match local_ip_address::local_ip() {
|
||||
|
@ -56,7 +56,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
format!(
|
||||
"BAT{}:{}%({})|",
|
||||
batc,
|
||||
(bat_res.state_of_charge().value * 100.0).to_string(),
|
||||
((bat_res.state_of_charge().value * 100.0) as i8).to_string(),
|
||||
bat_res.state().to_string(),
|
||||
)
|
||||
.as_str(),
|
||||
|
|
Loading…
Add table
Reference in a new issue