From 99d73426b889fb8c527ad98febb549320f54f41f Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Thu, 27 Nov 2014 12:05:59 +0100 Subject: [PATCH] Uncrustify --- flight/pios/stm32f10x/pios_dsm.c | 7 +++---- flight/pios/stm32f4xx/pios_dsm.c | 7 +++---- flight/targets/boards/revolution/firmware/pios_board.c | 2 +- .../setupwizard/pages/airframeinitialtuningpage.cpp | 3 ++- .../src/plugins/setupwizard/vehicleconfigurationhelper.cpp | 6 +++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/flight/pios/stm32f10x/pios_dsm.c b/flight/pios/stm32f10x/pios_dsm.c index b1ba35004..5fa1fb7ff 100644 --- a/flight/pios/stm32f10x/pios_dsm.c +++ b/flight/pios/stm32f10x/pios_dsm.c @@ -180,7 +180,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev) { struct pios_dsm_state *state = &(dsm_dev->state); /* Fix resolution for detection. */ - static uint8_t resolution = 11; + static uint8_t resolution = 11; uint32_t channel_log = 0; #ifdef DSM_LOST_FRAME_COUNTER @@ -213,8 +213,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev) /* extract and save the channel value */ uint8_t channel_num = (word >> resolution) & 0x0f; if (channel_num < PIOS_DSM_NUM_INPUTS) { - if (channel_log & (1 << channel_num)) - { + if (channel_log & (1 << channel_num)) { /* Found duplicate! */ /* Update resolution and restart processing the current frame. */ resolution = 10; @@ -282,7 +281,7 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id, } /* Bind the configuration to the device instance */ - dsm_dev->cfg = cfg; + dsm_dev->cfg = cfg; /* Bind the receiver if requested */ if (bind) { diff --git a/flight/pios/stm32f4xx/pios_dsm.c b/flight/pios/stm32f4xx/pios_dsm.c index 44b3d022d..c1fa41947 100644 --- a/flight/pios/stm32f4xx/pios_dsm.c +++ b/flight/pios/stm32f4xx/pios_dsm.c @@ -181,7 +181,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev) { struct pios_dsm_state *state = &(dsm_dev->state); /* Fix resolution for detection. */ - static uint8_t resolution = 11; + static uint8_t resolution = 11; uint32_t channel_log = 0; #ifdef DSM_LOST_FRAME_COUNTER @@ -213,8 +213,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev) /* extract and save the channel value */ uint8_t channel_num = (word >> resolution) & 0x0f; if (channel_num < PIOS_DSM_NUM_INPUTS) { - if (channel_log & (1 << channel_num)) - { + if (channel_log & (1 << channel_num)) { /* Found duplicate! */ /* Update resolution and restart processing the current frame. */ resolution = 10; @@ -282,7 +281,7 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id, } /* Bind the configuration to the device instance */ - dsm_dev->cfg = cfg; + dsm_dev->cfg = cfg; /* Bind the receiver if requested */ if (bind) { diff --git a/flight/targets/boards/revolution/firmware/pios_board.c b/flight/targets/boards/revolution/firmware/pios_board.c index 30cea4eef..9e36b96c8 100644 --- a/flight/targets/boards/revolution/firmware/pios_board.c +++ b/flight/targets/boards/revolution/firmware/pios_board.c @@ -643,7 +643,7 @@ void PIOS_Board_Init(void) // TODO: Define the various Channelgroup for Revo dsm inputs and handle here PIOS_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg, &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); - break; + break; case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE: #if defined(PIOS_INCLUDE_DEBUG_CONSOLE) { diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp index a05281cfc..13e012bf0 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp @@ -210,6 +210,7 @@ void AirframeInitialTuningPage::loadValidFiles() void AirframeInitialTuningPage::setupTemplateList() { QListWidgetItem *item; + foreach(QString templ, m_templates.keys()) { QJsonObject *json = m_templates[templ]; @@ -222,7 +223,7 @@ void AirframeInitialTuningPage::setupTemplateList() item->setData(Qt::UserRole + 1, QVariant::fromValue((QJsonObject *)NULL)); ui->templateList->insertItem(0, item); ui->templateList->setCurrentRow(0); - //TODO Add generics to top under item Current tuning + // TODO Add generics to top under item Current tuning } QString AirframeInitialTuningPage::getTemplateKey(QJsonObject *templ) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index 520ddf45c..26a69ec76 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -164,7 +164,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration() break; } break; - case VehicleConfigurationSource::CONTROLLER_REVO: + case VehicleConfigurationSource::CONTROLLER_REVO: case VehicleConfigurationSource::CONTROLLER_NANO: case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4: // Reset all ports to their defaults @@ -173,7 +173,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration() // Revo uses inbuilt Modem do not set mainport to be active telemetry link for the Revo if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) { - data.RM_MainPort = HwSettings::RM_MAINPORT_DISABLED; + data.RM_MainPort = HwSettings::RM_MAINPORT_DISABLED; } else { data.RM_MainPort = HwSettings::RM_MAINPORT_TELEMETRY; } @@ -186,7 +186,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration() data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PPM; break; case VehicleConfigurationSource::INPUT_SBUS: - data.RM_MainPort = HwSettings::RM_MAINPORT_SBUS; + data.RM_MainPort = HwSettings::RM_MAINPORT_SBUS; // We have to set telemetry on flexport since s.bus needs the mainport on all but Revo. if (m_configSource->getControllerType() != VehicleConfigurationSource::CONTROLLER_REVO) { data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY;