diff options
author | James Goppert <james.goppert@gmail.com> | 2013-06-22 13:45:12 -0400 |
---|---|---|
committer | James Goppert <james.goppert@gmail.com> | 2013-07-28 00:05:56 -0400 |
commit | e7cc6e71ad5d53d940a0e5c6961e5ea6c3a59e27 (patch) | |
tree | 4a974636b3ba00f1773780eb49be19f324aa8ff3 /src/drivers | |
parent | 42f09c4b547052d9fe2ef49f40a2df6910cf75b1 (diff) | |
download | px4-firmware-e7cc6e71ad5d53d940a0e5c6961e5ea6c3a59e27.tar.gz px4-firmware-e7cc6e71ad5d53d940a0e5c6961e5ea6c3a59e27.tar.bz2 px4-firmware-e7cc6e71ad5d53d940a0e5c6961e5ea6c3a59e27.zip |
Added pub update.
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/md25/md25.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/md25/md25.cpp b/src/drivers/md25/md25.cpp index 13d5c7eeb..582b871c7 100644 --- a/src/drivers/md25/md25.cpp +++ b/src/drivers/md25/md25.cpp @@ -605,11 +605,13 @@ int md25Sine(const char *deviceName, uint8_t bus, uint8_t address) input_signal.timestamp_ms = timestamp; input_signal.value = amplitude*sinf(omega*t); md25.setMotor1Speed(input_signal.value); + input_signal.update(); // output output_signal.timestamp_ms = timestamp; float speed_rpm = 60*(md25.getRevolutions1() - prev_revolution)/dt; output_signal.value = speed_rpm; + output_signal.update(); mavlink_log_info(mavlink_fd, "rpm: %10.4f\n", (double)speed_rpm); md25.readData(); if (t > 2.0f) break; |