aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_main.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:45:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:45:51 +0200
commit29835759655b94e7f45b68489ee14e3b4308570d (patch)
tree556235c481c64209de6a743570fa6c427a8d7439 /src/jo_main.c
parentHex, removed lowbat bin (diff)
downloadlowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.gz
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.bz2
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.xz
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.zst
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.zip
Now getting percent
Diffstat (limited to 'src/jo_main.c')
-rw-r--r--src/jo_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jo_main.c b/src/jo_main.c
index e5576b3..7ee0c83 100644
--- a/src/jo_main.c
+++ b/src/jo_main.c
@@ -22,10 +22,14 @@ int
main(void)
{
int8_t status;
+ int8_t percent;
if ((status = jo_f_status()) < 0) {
return (JO_RET_RD_FAILED);
}
- printf("status: %d\n", status);
+ if ((percent = jo_f_percent()) < 0) {
+ return (JO_RET_RD_FAILED);
+ }
+ printf("status: %hhd, %hhd%%\n", status, percent);
return (JO_RET_FINE);
}