From 481bff2578abe4c41a117dbfe80fb3bb608c3138 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 1 Nov 2011 18:48:07 +0200 Subject: [PATCH] spektrum: code style fixes accoring to OPReview-122 --- flight/CopterControl/System/pios_board.c | 10 ++++++++-- .../src/plugins/config/config_cc_hw_widget.cpp | 1 + .../src/plugins/config/config_cc_hw_widget.h | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index de343cb83..42f9538ea 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -1204,6 +1204,9 @@ void PIOS_Board_Init(void) { { enum pios_dsm_proto proto; switch (hwsettings_cc_mainport) { + case HWSETTINGS_CC_MAINPORT_DSM2: + proto = PIOS_DSM_PROTO_DSM2; + break; case HWSETTINGS_CC_MAINPORT_DSMX10BIT: proto = PIOS_DSM_PROTO_DSMX10BIT; break; @@ -1211,7 +1214,7 @@ void PIOS_Board_Init(void) { proto = PIOS_DSM_PROTO_DSMX11BIT; break; default: - proto = PIOS_DSM_PROTO_DSM2; + PIOS_Assert(0); break; } @@ -1291,6 +1294,9 @@ void PIOS_Board_Init(void) { { enum pios_dsm_proto proto; switch (hwsettings_cc_flexiport) { + case HWSETTINGS_CC_FLEXIPORT_DSM2: + proto = PIOS_DSM_PROTO_DSM2; + break; case HWSETTINGS_CC_FLEXIPORT_DSMX10BIT: proto = PIOS_DSM_PROTO_DSMX10BIT; break; @@ -1298,7 +1304,7 @@ void PIOS_Board_Init(void) { proto = PIOS_DSM_PROTO_DSMX11BIT; break; default: - proto = PIOS_DSM_PROTO_DSM2; + PIOS_Assert(0); break; } diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp index 6330af20b..5cdd8139a 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp @@ -25,6 +25,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config_cc_hw_widget.h" +#include "hwsettings.h" #include #include diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h index ed97b5c70..f815786fb 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h @@ -35,7 +35,6 @@ #include #include #include "smartsavebutton.h" -#include "hwsettings.h" class ConfigCCHWWidget: public ConfigTaskWidget {