1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Uncrustify

This commit is contained in:
Alessio Morale 2014-11-27 12:05:59 +01:00
parent 6485ffbd9a
commit 99d73426b8
5 changed files with 12 additions and 13 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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)
{

View File

@ -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)

View File

@ -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;