aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-02 10:46:29 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-12-02 10:46:29 +0100
commit4d91c61f8f5aaebd8bcf0add27591fafa9c41dbe (patch)
treee970fa485cd808a7bf7cfa61c7b3bb761bd502b5 /src/examples
parentdfb266565a2f1849ddd67460950b674a44eb6530 (diff)
downloadpx4-firmware-4d91c61f8f5aaebd8bcf0add27591fafa9c41dbe.tar.gz
px4-firmware-4d91c61f8f5aaebd8bcf0add27591fafa9c41dbe.tar.bz2
px4-firmware-4d91c61f8f5aaebd8bcf0add27591fafa9c41dbe.zip
add macros for easy 2d array support, builds on px4 test build
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/flow_position_estimator/flow_position_estimator_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/examples/flow_position_estimator/flow_position_estimator_main.c b/src/examples/flow_position_estimator/flow_position_estimator_main.c
index 0b8c01f79..8cc9ed686 100644
--- a/src/examples/flow_position_estimator/flow_position_estimator_main.c
+++ b/src/examples/flow_position_estimator/flow_position_estimator_main.c
@@ -67,6 +67,7 @@
#include <systemlib/perf_counter.h>
#include <systemlib/systemlib.h>
#include <poll.h>
+#include <px4_defines.h>
#include "flow_position_estimator_params.h"
@@ -337,7 +338,7 @@ int flow_position_estimator_thread_main(int argc, char *argv[])
{
float sum = 0.0f;
for(uint8_t j = 0; j < 3; j++)
- sum = sum + speed[j] * att.R[i][j];
+ sum = sum + speed[j] * PX4_R(att.R, i, j);
global_speed[i] = sum;
}