mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
LP-72 small or cosmetic for PR - more to come
This commit is contained in:
parent
b603b10be8
commit
acab5c93f1
@ -1,5 +1,5 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
****************************************************************************************
|
||||
* @file pios_board.c
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
|
||||
@ -8,8 +8,8 @@
|
||||
* @{
|
||||
* @addtogroup OpenPilotCore OpenPilot Core
|
||||
* @{
|
||||
* @brief Defines board specific static initializers for hardware for the revomini board.
|
||||
*****************************************************************************/
|
||||
* @brief Defines board specific static initializers for hardware for the Sparky2 board.
|
||||
***************************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -484,7 +484,7 @@ void PIOS_Board_Init(void)
|
||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, PIOS_COM_GPS_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_gps_id);
|
||||
break;
|
||||
case HWSETTINGS_RM_FLEXIPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
// TODO: Define the various Channelgroup for Sparky2 dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
@ -727,7 +727,7 @@ void PIOS_Board_Init(void)
|
||||
// Force binding to zero on the main port
|
||||
hwsettings_DSMxBind = 0;
|
||||
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
// TODO: Define the various Channelgroup for Sparky2 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;
|
||||
@ -868,18 +868,6 @@ void PIOS_Board_Init(void)
|
||||
#endif
|
||||
|
||||
/* Configure the receiver port*/
|
||||
// Revo Flex-IO Port Functions
|
||||
// 1: GND
|
||||
// 2: VCC_UNREG
|
||||
// 3: PB12 = SPI2 NSS, CAN2 RX
|
||||
// 4: PB13 = SPI2 SCK, CAN2 TX, USART3 CTS
|
||||
// 5: PB14 = SPI2 MISO, TIM12 CH1, USART3 RTS
|
||||
// 6: PB15 = SPI2 MOSI, TIM12 CH2
|
||||
// 7: PC6 = TIM8 CH1, USART6 TX
|
||||
// 8: PC7 = TIM8 CH2, USART6 RX
|
||||
// 9: PC8 = TIM8 CH3
|
||||
// 10: PC9 = TIM8 CH4
|
||||
//
|
||||
// Sparky2 receiver input on PC7 TIM8 CH2
|
||||
// that appears to include PPM, DSM, DSM-HSUM, SBUS
|
||||
uint8_t hwsettings_rcvrport;
|
||||
@ -913,7 +901,7 @@ void PIOS_Board_Init(void)
|
||||
#endif
|
||||
break;
|
||||
case HWSETTINGS_SPK2_RCVRPORT_DSM:
|
||||
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here
|
||||
// TODO: Define the various Channelgroup for Sparky2 dsm inputs and handle here
|
||||
PIOS_Board_configure_dsm(&pios_usart_dsm_rcvr_cfg, &pios_dsm_rcvr_cfg,
|
||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMRCVRPORT, &hwsettings_DSMxBind);
|
||||
break;
|
||||
|
@ -207,7 +207,8 @@ void ConfigOPLinkWidget::updateSettings(UAVObject *object)
|
||||
// Enable components based on the board type connected.
|
||||
UAVObjectField *board_type_field = oplinkStatusObj->getField("BoardType");
|
||||
switch (board_type_field->getValue().toInt()) {
|
||||
case 0x09: // Revolution
|
||||
case 0x09: // Revolution, DiscoveryF4Bare, RevoNano, RevoProto
|
||||
case 0x0B: // Sparky2
|
||||
m_oplink->MainPort->setVisible(false);
|
||||
m_oplink->MainPortLabel->setVisible(false);
|
||||
m_oplink->FlexiPort->setVisible(false);
|
||||
@ -231,7 +232,7 @@ void ConfigOPLinkWidget::updateSettings(UAVObject *object)
|
||||
connect(m_oplink->MainPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions()));
|
||||
connect(m_oplink->FlexiPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions()));
|
||||
break;
|
||||
case 0x0A: // OPLink?
|
||||
case 0x0A: // OPLink? (No. 0x0A is gpsplatinum. This is wrong.)
|
||||
m_oplink->MainPort->setVisible(true);
|
||||
m_oplink->MainPortLabel->setVisible(true);
|
||||
m_oplink->FlexiPort->setVisible(true);
|
||||
|
@ -27,15 +27,18 @@
|
||||
*/
|
||||
#include "configsparky2hwwidget.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include "ui_configsparky2hwwidget.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
#include "hwsettings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
ConfigSparky2HWWidget::ConfigSparky2HWWidget(QWidget *parent) : ConfigTaskWidget(parent), m_refreshing(true)
|
||||
{
|
||||
m_ui = new Ui_Sparky2HWWidget();
|
||||
@ -67,9 +70,6 @@ ConfigSparky2HWWidget::ConfigSparky2HWWidget(QWidget *parent) : ConfigTaskWidget
|
||||
addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbMainGPSSpeed);
|
||||
addWidgetBinding("HwSettings", "ComUsbBridgeSpeed", m_ui->cbMainComSpeed);
|
||||
|
||||
// addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbRcvrTelemSpeed);
|
||||
// addWidgetBinding("HwSettings", "ComUsbBridgeSpeed", m_ui->cbRcvrComSpeed);
|
||||
|
||||
// Add Gps protocol configuration
|
||||
addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbMainGPSProtocol);
|
||||
addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbFlexiGPSProtocol);
|
||||
@ -100,7 +100,6 @@ void ConfigSparky2HWWidget::setupCustomCombos()
|
||||
|
||||
connect(m_ui->cbFlexi, SIGNAL(currentIndexChanged(int)), this, SLOT(flexiPortChanged(int)));
|
||||
connect(m_ui->cbMain, SIGNAL(currentIndexChanged(int)), this, SLOT(mainPortChanged(int)));
|
||||
// connect(m_ui->cbRcvr, SIGNAL(currentIndexChanged(int)), this, SLOT(rcvrPortChanged(int)));
|
||||
}
|
||||
|
||||
void ConfigSparky2HWWidget::refreshWidgetsValues(UAVObject *obj)
|
||||
@ -111,7 +110,6 @@ void ConfigSparky2HWWidget::refreshWidgetsValues(UAVObject *obj)
|
||||
usbVCPPortChanged(0);
|
||||
mainPortChanged(0);
|
||||
flexiPortChanged(0);
|
||||
// rcvrPortChanged(0);
|
||||
m_refreshing = false;
|
||||
}
|
||||
|
||||
|
@ -28,14 +28,13 @@
|
||||
#ifndef CONFIGSPARKY2HWWIDGET_H
|
||||
#define CONFIGSPARKY2HWWIDGET_H
|
||||
|
||||
#include "ui_configsparky2hwwidget.h"
|
||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||
#include "extensionsystem/pluginmanager.h"
|
||||
#include "uavobjectmanager.h"
|
||||
#include "uavobject.h"
|
||||
#include <QWidget>
|
||||
#include <QList>
|
||||
|
||||
class Ui_Sparky2HWWidget;
|
||||
|
||||
class UAVObject;
|
||||
|
||||
class QWidget;
|
||||
|
||||
class ConfigSparky2HWWidget : public ConfigTaskWidget {
|
||||
Q_OBJECT
|
||||
@ -45,8 +44,8 @@ public:
|
||||
~ConfigSparky2HWWidget();
|
||||
|
||||
private:
|
||||
bool m_refreshing;
|
||||
Ui_Sparky2HWWidget *m_ui;
|
||||
bool m_refreshing;
|
||||
void setupCustomCombos();
|
||||
|
||||
protected slots:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 110 KiB |
@ -1,15 +1,15 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
****************************************************************************************
|
||||
*
|
||||
* @file inputpage.cpp
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup InputPage
|
||||
* @{
|
||||
* @brief
|
||||
*****************************************************************************/
|
||||
***************************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
***********************************************************************************
|
||||
*
|
||||
* @file vehicleconfigurationhelper.cpp
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||
@ -9,7 +9,7 @@
|
||||
* @addtogroup VehicleConfigurationHelper
|
||||
* @{
|
||||
* @brief
|
||||
*****************************************************************************/
|
||||
**********************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -212,7 +212,7 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_SBUS;
|
||||
} else {
|
||||
data.RM_MainPort = HwSettings::RM_MAINPORT_SBUS;
|
||||
// We have to set telemetry to flexport on all except Revo (and except Sparky2) since s.bus needs the mainport.
|
||||
// We have to set telemetry to flexiport on all except Revo (and except Sparky2) since s.bus needs mainport.
|
||||
if (m_configSource->getControllerType() != VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY;
|
||||
}
|
||||
@ -1851,6 +1851,7 @@ void VehicleConfigurationHelper::setupOctoCopter()
|
||||
guiSettings.multi.VTOLMotorE = 3;
|
||||
guiSettings.multi.VTOLMotorSE = 4;
|
||||
guiSettings.multi.VTOLMotorS = 5;
|
||||
|
||||
guiSettings.multi.VTOLMotorSW = 6;
|
||||
guiSettings.multi.VTOLMotorW = 7;
|
||||
guiSettings.multi.VTOLMotorNW = 8;
|
||||
|
@ -11,17 +11,17 @@
|
||||
<field name="RV_TelemetryPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,ComAux,ComBridge,MSP" defaultvalue="Telemetry"/>
|
||||
<field name="RV_GPSPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,ComAux,ComBridge,MSP" defaultvalue="GPS"/>
|
||||
|
||||
<field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,S.Bus,Telemetry,ComBridge,MSP"
|
||||
<field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,Telemetry,ComBridge,MSP"
|
||||
defaultvalue="PWM"
|
||||
limits="%0905NE:PPM+PWM:PPM+Telemetry:Telemetry:ComBridge;"/>
|
||||
<field name="RM_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM,DebugConsole,ComBridge,OsdHk,MSP" defaultvalue="Disabled"/>
|
||||
<field name="RM_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM,DebugConsole,ComBridge,OsdHk,MSP" defaultvalue="Disabled"/>
|
||||
<field name="RM_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,DSM,EX.Bus,HoTT SUMD,HoTT SUMH,SRXL,DebugConsole,ComBridge,OsdHk,MSP" defaultvalue="Disabled"/>
|
||||
|
||||
<field name="SPK2_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PPM,S.Bus,DSM,SRXL"
|
||||
<field name="SPK2_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PPM,S.Bus,DSM,SRXL,MSP"
|
||||
defaultvalue="S.Bus"/>
|
||||
<field name="SPK2_I2CPort" units="function" type="enum" elements="1" options="Disabled,I2C"
|
||||
defaultvalue="Disabled"/>
|
||||
<field name="SPK2_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,DSM,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
|
||||
<field name="SPK2_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,DSM,DebugConsole,ComBridge,OsdHk,MSP" defaultvalue="Disabled"/>
|
||||
|
||||
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||
<field name="GPSSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200,230400" defaultvalue="57600"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user