aboutsummaryrefslogtreecommitdiff
path: root/apps/systemcmds
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-23 18:58:19 -0800
committerpx4dev <px4@purgatory.org>2013-01-23 18:58:19 -0800
commitdc88dd0abb440b070e87337a7da6fd7a4c39311c (patch)
tree00260c9b8b5d6f20983f1ffbe211c39c87bd2b85 /apps/systemcmds
parentd8a013f8720e81afb637b8206fbe521ccb43ac8f (diff)
parent1ce1d4460b1c7884490118ea356bf61ffbd31163 (diff)
downloadpx4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.tar.gz
px4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.tar.bz2
px4-firmware-dc88dd0abb440b070e87337a7da6fd7a4c39311c.zip
Merge branch 'master' into px4io-i2c
Diffstat (limited to 'apps/systemcmds')
-rw-r--r--apps/systemcmds/perf/perf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/systemcmds/perf/perf.c b/apps/systemcmds/perf/perf.c
index ced942fd6..64443d019 100644
--- a/apps/systemcmds/perf/perf.c
+++ b/apps/systemcmds/perf/perf.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
#include <unistd.h>
#include <stdio.h>
+#include <string.h>
#include "systemlib/perf_counter.h"
@@ -63,6 +64,15 @@ __EXPORT int perf_main(int argc, char *argv[]);
int perf_main(int argc, char *argv[])
{
+ if (argc > 1) {
+ if (strcmp(argv[1], "reset") == 0) {
+ perf_reset_all();
+ return 0;
+ }
+ printf("Usage: perf <reset>\n");
+ return -1;
+ }
+
perf_print_all();
fflush(stdout);
return 0;