1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merge remote-tracking branch 'origin/amorale/OP-1548_add_limits_for_fusion_algorithm' into rel-14.10

This commit is contained in:
Fredrik Larsson 2014-10-21 19:31:32 +11:00
commit 8c76aa7863
5 changed files with 14 additions and 6 deletions

View File

@ -75,7 +75,7 @@ int32_t configuration_check()
bool navCapableFusion;
switch (revoFusion) {
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAGGPSOUTDOOR:
case REVOSETTINGS_FUSIONALGORITHM_INS13GPSOUTDOOR:
case REVOSETTINGS_FUSIONALGORITHM_GPSNAVIGATIONINS13:
navCapableFusion = true;
break;
default:

View File

@ -382,7 +382,7 @@ static void StateEstimationCb(void)
if (fs.Armed == FLIGHTSTATUS_ARMED_DISARMED || fusionAlgorithm == FILTER_INIT_FORCE) {
const filterPipeline *newFilterChain;
switch (revoSettings.FusionAlgorithm) {
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARY:
case REVOSETTINGS_FUSIONALGORITHM_BASICCOMPLEMENTARY:
newFilterChain = cfQueue;
break;
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAG:
@ -394,7 +394,7 @@ static void StateEstimationCb(void)
case REVOSETTINGS_FUSIONALGORITHM_INS13INDOOR:
newFilterChain = ekf13iQueue;
break;
case REVOSETTINGS_FUSIONALGORITHM_INS13GPSOUTDOOR:
case REVOSETTINGS_FUSIONALGORITHM_GPSNAVIGATIONINS13:
newFilterChain = ekf13Queue;
break;
default:

View File

@ -186,7 +186,7 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) :
// home location
connect(m_ui->hlClearButton, SIGNAL(clicked()), this, SLOT(clearHomeLocation()));
addWidgetBinding("RevoSettings", "FusionAlgorithm", m_ui->FusionAlgorithm);
addWidgetBinding("RevoSettings", "FusionAlgorithm", m_ui->FusionAlgorithm, 0, 1, true);
addWidgetBinding("AttitudeSettings", "BoardRotation", m_ui->rollRotation, AttitudeSettings::BOARDROTATION_ROLL);
addWidgetBinding("AttitudeSettings", "BoardRotation", m_ui->pitchRotation, AttitudeSettings::BOARDROTATION_PITCH);
@ -194,10 +194,12 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) :
addWidgetBinding("AttitudeSettings", "AccelTau", m_ui->accelTau);
populateWidgets();
refreshWidgetsValues();
enableAllCalibrations();
updateEnableControls();
forceConnectedState();
refreshWidgetsValues();
}
ConfigRevoWidget::~ConfigRevoWidget()

View File

@ -252,6 +252,9 @@ void ConfigTaskWidget::onAutopilotDisconnect()
// dynamic widgets don't recieve the connected signal. This should be called instead.
void ConfigTaskWidget::forceConnectedState()
{
if (m_objectUtilManager) {
m_currentBoardId = m_objectUtilManager->getBoardModel();
}
m_isConnected = true;
setDirty(false);
}

View File

@ -1,7 +1,10 @@
<xml>
<object name="RevoSettings" singleinstance="true" settings="true" category="State">
<description>Settings for the revo to control the algorithm and what is updated</description>
<field name="FusionAlgorithm" units="" type="enum" elements="1" options="None,Complementary,Complementary+Mag,Complementary+Mag+GPSOutdoor,INS13Indoor,INS13GPSOutdoor" defaultvalue="Complementary"/>
<field name="FusionAlgorithm" units="" type="enum" elements="1"
options="None,Basic (Complementary),Complementary+Mag,Complementary+Mag+GPSOutdoor,INS13Indoor,GPS Navigation (INS13)"
limits="%NE:None:Complementary+Mag:Complementary+Mag+GPSOutdoor:INS13Indoor;"
defaultvalue="Complementary"/>
<!-- Low pass filter configuration to calculate offset of barometric altitude sensor.
Defaults: updates at 5 Hz, tau = 300s settle time, exp(-(1/f)/tau) ~= 0.9993335555062