mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Uncrustify
This commit is contained in:
parent
6485ffbd9a
commit
99d73426b8
@ -180,7 +180,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev)
|
|||||||
{
|
{
|
||||||
struct pios_dsm_state *state = &(dsm_dev->state);
|
struct pios_dsm_state *state = &(dsm_dev->state);
|
||||||
/* Fix resolution for detection. */
|
/* Fix resolution for detection. */
|
||||||
static uint8_t resolution = 11;
|
static uint8_t resolution = 11;
|
||||||
uint32_t channel_log = 0;
|
uint32_t channel_log = 0;
|
||||||
|
|
||||||
#ifdef DSM_LOST_FRAME_COUNTER
|
#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 */
|
/* extract and save the channel value */
|
||||||
uint8_t channel_num = (word >> resolution) & 0x0f;
|
uint8_t channel_num = (word >> resolution) & 0x0f;
|
||||||
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
||||||
if (channel_log & (1 << channel_num))
|
if (channel_log & (1 << channel_num)) {
|
||||||
{
|
|
||||||
/* Found duplicate! */
|
/* Found duplicate! */
|
||||||
/* Update resolution and restart processing the current frame. */
|
/* Update resolution and restart processing the current frame. */
|
||||||
resolution = 10;
|
resolution = 10;
|
||||||
@ -282,7 +281,7 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Bind the configuration to the device instance */
|
/* Bind the configuration to the device instance */
|
||||||
dsm_dev->cfg = cfg;
|
dsm_dev->cfg = cfg;
|
||||||
|
|
||||||
/* Bind the receiver if requested */
|
/* Bind the receiver if requested */
|
||||||
if (bind) {
|
if (bind) {
|
||||||
|
@ -181,7 +181,7 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev)
|
|||||||
{
|
{
|
||||||
struct pios_dsm_state *state = &(dsm_dev->state);
|
struct pios_dsm_state *state = &(dsm_dev->state);
|
||||||
/* Fix resolution for detection. */
|
/* Fix resolution for detection. */
|
||||||
static uint8_t resolution = 11;
|
static uint8_t resolution = 11;
|
||||||
uint32_t channel_log = 0;
|
uint32_t channel_log = 0;
|
||||||
|
|
||||||
#ifdef DSM_LOST_FRAME_COUNTER
|
#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 */
|
/* extract and save the channel value */
|
||||||
uint8_t channel_num = (word >> resolution) & 0x0f;
|
uint8_t channel_num = (word >> resolution) & 0x0f;
|
||||||
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
||||||
if (channel_log & (1 << channel_num))
|
if (channel_log & (1 << channel_num)) {
|
||||||
{
|
|
||||||
/* Found duplicate! */
|
/* Found duplicate! */
|
||||||
/* Update resolution and restart processing the current frame. */
|
/* Update resolution and restart processing the current frame. */
|
||||||
resolution = 10;
|
resolution = 10;
|
||||||
@ -282,7 +281,7 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Bind the configuration to the device instance */
|
/* Bind the configuration to the device instance */
|
||||||
dsm_dev->cfg = cfg;
|
dsm_dev->cfg = cfg;
|
||||||
|
|
||||||
/* Bind the receiver if requested */
|
/* Bind the receiver if requested */
|
||||||
if (bind) {
|
if (bind) {
|
||||||
|
@ -643,7 +643,7 @@ void PIOS_Board_Init(void)
|
|||||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
// 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_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg,
|
||||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
|
@ -210,6 +210,7 @@ void AirframeInitialTuningPage::loadValidFiles()
|
|||||||
void AirframeInitialTuningPage::setupTemplateList()
|
void AirframeInitialTuningPage::setupTemplateList()
|
||||||
{
|
{
|
||||||
QListWidgetItem *item;
|
QListWidgetItem *item;
|
||||||
|
|
||||||
foreach(QString templ, m_templates.keys()) {
|
foreach(QString templ, m_templates.keys()) {
|
||||||
QJsonObject *json = m_templates[templ];
|
QJsonObject *json = m_templates[templ];
|
||||||
|
|
||||||
@ -222,7 +223,7 @@ void AirframeInitialTuningPage::setupTemplateList()
|
|||||||
item->setData(Qt::UserRole + 1, QVariant::fromValue((QJsonObject *)NULL));
|
item->setData(Qt::UserRole + 1, QVariant::fromValue((QJsonObject *)NULL));
|
||||||
ui->templateList->insertItem(0, item);
|
ui->templateList->insertItem(0, item);
|
||||||
ui->templateList->setCurrentRow(0);
|
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)
|
QString AirframeInitialTuningPage::getTemplateKey(QJsonObject *templ)
|
||||||
|
@ -173,7 +173,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
|||||||
|
|
||||||
// Revo uses inbuilt Modem do not set mainport to be active telemetry link for the Revo
|
// Revo uses inbuilt Modem do not set mainport to be active telemetry link for the Revo
|
||||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||||
data.RM_MainPort = HwSettings::RM_MAINPORT_DISABLED;
|
data.RM_MainPort = HwSettings::RM_MAINPORT_DISABLED;
|
||||||
} else {
|
} else {
|
||||||
data.RM_MainPort = HwSettings::RM_MAINPORT_TELEMETRY;
|
data.RM_MainPort = HwSettings::RM_MAINPORT_TELEMETRY;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
|||||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PPM;
|
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PPM;
|
||||||
break;
|
break;
|
||||||
case VehicleConfigurationSource::INPUT_SBUS:
|
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.
|
// We have to set telemetry on flexport since s.bus needs the mainport on all but Revo.
|
||||||
if (m_configSource->getControllerType() != VehicleConfigurationSource::CONTROLLER_REVO) {
|
if (m_configSource->getControllerType() != VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY;
|
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user