From d511e39ea7a3f1e0cb672b14598e18a7df18156a Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 22 Dec 2014 17:09:43 -0500 Subject: turn on -Werror and fix resulting errors --- src/lib/conversion/rotation.cpp | 5 +++++ src/lib/rc/st24.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/conversion/rotation.cpp b/src/lib/conversion/rotation.cpp index e17715733..3d3e13355 100644 --- a/src/lib/conversion/rotation.cpp +++ b/src/lib/conversion/rotation.cpp @@ -181,6 +181,11 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z) x = tmp; return; } + case ROTATION_ROLL_270_YAW_270: { + // unimplemented + ASSERT(0 == 1); + return; + } case ROTATION_PITCH_90: { tmp = z; z = -x; x = tmp; return; diff --git a/src/lib/rc/st24.c b/src/lib/rc/st24.c index e8a791b8f..5c53a1602 100644 --- a/src/lib/rc/st24.c +++ b/src/lib/rc/st24.c @@ -72,7 +72,7 @@ const char *decode_states[] = {"UNSYNCED", #define ST24_SCALE_OFFSET (int)(ST24_TARGET_MIN - (ST24_SCALE_FACTOR * ST24_RANGE_MIN + 0.5f)) static enum ST24_DECODE_STATE _decode_state = ST24_DECODE_STATE_UNSYNCED; -static unsigned _rxlen; +static uint8_t _rxlen; static ReceiverFcPacket _rxpacket; -- cgit v1.2.3 From d14fdf896b0081403908599a3164d09941d363c9 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 23 Dec 2014 10:56:32 -0500 Subject: rotate_3f() implement missing ROTATION_ROLL_270_YAW_270 --- src/examples/fixedwing_control/module.mk | 2 +- src/lib/conversion/rotation.cpp | 4 ++-- src/modules/attitude_estimator_ekf/module.mk | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/examples/fixedwing_control/module.mk b/src/examples/fixedwing_control/module.mk index 3fab9c8d4..8707776ae 100644 --- a/src/examples/fixedwing_control/module.mk +++ b/src/examples/fixedwing_control/module.mk @@ -42,4 +42,4 @@ SRCS = main.c \ MODULE_STACKSIZE = 1200 -EXTRACFLAGS = -Wno-error +EXTRACFLAGS = -Wno-frame-larger-than diff --git a/src/lib/conversion/rotation.cpp b/src/lib/conversion/rotation.cpp index 3d3e13355..1fe36d395 100644 --- a/src/lib/conversion/rotation.cpp +++ b/src/lib/conversion/rotation.cpp @@ -182,8 +182,8 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z) return; } case ROTATION_ROLL_270_YAW_270: { - // unimplemented - ASSERT(0 == 1); + tmp = z; z = -y; y = tmp; + tmp = x; x = y; y = -tmp; return; } case ROTATION_PITCH_90: { diff --git a/src/modules/attitude_estimator_ekf/module.mk b/src/modules/attitude_estimator_ekf/module.mk index c4bf34229..96ba45242 100644 --- a/src/modules/attitude_estimator_ekf/module.mk +++ b/src/modules/attitude_estimator_ekf/module.mk @@ -43,7 +43,6 @@ SRCS = attitude_estimator_ekf_main.cpp \ MODULE_STACKSIZE = 1200 -EXTRACFLAGS = -Wno-float-equal -Wno-error - -EXTRACXXFLAGS = -Wno-error +EXTRACFLAGS = -Wno-float-equal +EXTRACXXFLAGS = -Wno-frame-larger-than -- cgit v1.2.3