diff options
author | julianoes <julian@oes.ch> | 2014-02-27 17:29:01 +0100 |
---|---|---|
committer | julianoes <julian@oes.ch> | 2014-02-27 17:29:01 +0100 |
commit | 9b6f08dc7eefb2e4a055b1d89a0cec0022299ff9 (patch) | |
tree | 707be59aeca4fa271c416848ac5c83804c43efa4 | |
parent | d975bf1f85e71a11911a2ae6b24ba49e4e8a3f17 (diff) | |
parent | f8187650083b361f61c07ceb712c21a25d1c80c4 (diff) | |
download | px4-firmware-9b6f08dc7eefb2e4a055b1d89a0cec0022299ff9.tar.gz px4-firmware-9b6f08dc7eefb2e4a055b1d89a0cec0022299ff9.tar.bz2 px4-firmware-9b6f08dc7eefb2e4a055b1d89a0cec0022299ff9.zip |
Merge pull request #696 from PX4/top_fix
top: CPU % indication bug fixed
-rw-r--r-- | src/systemcmds/top/top.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemcmds/top/top.c b/src/systemcmds/top/top.c index 1ca3fc928..37e913040 100644 --- a/src/systemcmds/top/top.c +++ b/src/systemcmds/top/top.c @@ -233,8 +233,8 @@ top_main(void) system_load.tasks[i].tcb->pid, CONFIG_TASK_NAME_SIZE, system_load.tasks[i].tcb->name, (system_load.tasks[i].total_runtime / 1000), - (int)(curr_loads[i] * 100), - (int)(curr_loads[i] * 100000.0f - (int)(curr_loads[i] * 1000.0f) * 100), + (int)(curr_loads[i] * 100.0f), + (int)((curr_loads[i] * 100.0f - (int)(curr_loads[i] * 100.0f)) * 1000), stack_size - stack_free, stack_size, system_load.tasks[i].tcb->sched_priority, |