aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/md25/md25_main.cpp
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-06-29 17:04:43 -0400
committerJames Goppert <james.goppert@gmail.com>2013-07-28 00:05:56 -0400
commit308f1dbfa4787e84665a3e822ddf7d1979f023ca (patch)
tree0618e020ac6551e7fdfb4eca37decee6322c8639 /src/drivers/md25/md25_main.cpp
parent4cfcea176785975590d1d2952eb0b0270a6949b3 (diff)
downloadpx4-firmware-308f1dbfa4787e84665a3e822ddf7d1979f023ca.tar.gz
px4-firmware-308f1dbfa4787e84665a3e822ddf7d1979f023ca.tar.bz2
px4-firmware-308f1dbfa4787e84665a3e822ddf7d1979f023ca.zip
Added amplitude frequency to md25sine command.
Diffstat (limited to 'src/drivers/md25/md25_main.cpp')
-rw-r--r--src/drivers/md25/md25_main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/md25/md25_main.cpp b/src/drivers/md25/md25_main.cpp
index 701452f2d..b395088a3 100644
--- a/src/drivers/md25/md25_main.cpp
+++ b/src/drivers/md25/md25_main.cpp
@@ -139,7 +139,7 @@ int md25_main(int argc, char *argv[])
if (!strcmp(argv[1], "sine")) {
if (argc < 4) {
- printf("usage: md25 sine bus address\n");
+ printf("usage: md25 sine bus address amp freq\n");
exit(0);
}
@@ -149,7 +149,11 @@ int md25_main(int argc, char *argv[])
uint8_t address = strtoul(argv[3], nullptr, 0);
- md25Sine(deviceName, bus, address);
+ float amplitude = atof(argv[4]);
+
+ float frequency = atof(argv[5]);
+
+ md25Sine(deviceName, bus, address, amplitude, frequency);
exit(0);
}