aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/commander.cpp
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-08-16 10:17:57 +0200
committerJulian Oes <julian@oes.ch>2013-08-16 10:17:57 +0200
commit02c23c785e5aa5d85f737a7735bc62355f945066 (patch)
tree214641026d6a955961a184087f0cfebb25484c07 /src/modules/commander/commander.cpp
parentec9de4ad84be8e62b762567c58ec3bb948684b43 (diff)
downloadpx4-firmware-02c23c785e5aa5d85f737a7735bc62355f945066.tar.gz
px4-firmware-02c23c785e5aa5d85f737a7735bc62355f945066.tar.bz2
px4-firmware-02c23c785e5aa5d85f737a7735bc62355f945066.zip
System status load is now from 0 to 1 instead of non-intuitive 0 to 1000
Diffstat (limited to 'src/modules/commander/commander.cpp')
-rw-r--r--src/modules/commander/commander.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 926be91b9..fc7670ee5 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -862,7 +862,7 @@ int commander_thread_main(int argc, char *argv[])
uint64_t interval_runtime = system_load.tasks[0].total_runtime - last_idle_time;
if (last_idle_time > 0)
- status.load = 1000 - (interval_runtime / 1000); //system load is time spent in non-idle
+ status.load = 1.0f - ((float)interval_runtime / 1e6f); //system load is time spent in non-idle
last_idle_time = system_load.tasks[0].total_runtime;
}