1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-21 11:54:15 +01:00

Merge remote-tracking branch 'origin/rel-14.10' into next

This commit is contained in:
Fredrik Larsson 2014-11-01 08:28:16 +11:00
commit 9109246c20
10 changed files with 3225 additions and 67 deletions

View File

@ -3792,14 +3792,29 @@ uniquement lorsque les valeurs changent</translation>
<translation>Flot Données GPS</translation> <translation>Flot Données GPS</translation>
</message> </message>
<message> <message>
<location/>
<source>Displays the SNR for each detected sat. <source>Displays the SNR for each detected sat.
Satellite number (PRN) is displayed inside the green bar. Satellite number (PRN) is displayed inside the green bar.
Sat SNR is displayed above (in dBHz)</source> Sat SNR is displayed above (in dBHz)</source>
<translation>Affiche le SNR pour chaque satellite détecté. <translation type="vanished">Affiche le SNR pour chaque satellite détecté.
Le numéro du satellite (PRN) est affiché sur une barre verte. Le numéro du satellite (PRN) est affiché sur une barre verte.
Le SNR du satellite est affiché au-dessus (en dBHz)</translation> Le SNR du satellite est affiché au-dessus (en dBHz)</translation>
</message> </message>
<message>
<location/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Displays the SNR for each detected sat. Satellite number (PRN) is displayed inside the green bar (GPS) or orange bar (SBAS). Sat SNR is displayed above (in dBHz)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Affiche le SNR pour chaque satellite détecté. Le numéro du satellite (PRN) est affiché sur une barre verte (GPS) ou orange (SBAS). Le SNR du satellite est affiché au-dessus (en dBHz)</translation>
</message>
<message>
<location/>
<source>Alt :</source>
<translation>Alt :</translation>
</message>
<message>
<location/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Location of GCS on the Earth&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<extracomment>Location of GCS on the Earth</extracomment>
<translation>Position sur la terre</translation>
</message>
</context> </context>
<context> <context>
<name>IPconnectionOptionsPage</name> <name>IPconnectionOptionsPage</name>
@ -9520,14 +9535,14 @@ Veuillez sélectionner le type de multirotor désiré pour la configuration ci-d
</message> </message>
<message> <message>
<location/> <location/>
<location filename="../../../src/plugins/setupwizard/pages/outputcalibrationpage.cpp" line="+376"/> <location filename="../../../src/plugins/setupwizard/pages/outputcalibrationpage.cpp" line="+375"/>
<location line="+88"/> <location line="+90"/>
<source>Start</source> <source>Start</source>
<translation>Démarrer</translation> <translation>Démarrer</translation>
</message> </message>
<message> <message>
<location filename="../../../src/plugins/setupwizard/pages/outputcalibrationpage.cpp" line="-88"/> <location filename="../../../src/plugins/setupwizard/pages/outputcalibrationpage.cpp" line="-90"/>
<location line="+88"/> <location line="+90"/>
<source>Stop</source> <source>Stop</source>
<translation>Arrêter</translation> <translation>Arrêter</translation>
</message> </message>
@ -13489,7 +13504,6 @@ loaded in the current workspace.</source>
Configuration n&apos;est pas chargé dans l&apos;espace de travail actuel.</translation> Configuration n&apos;est pas chargé dans l&apos;espace de travail actuel.</translation>
</message> </message>
<message> <message>
<location filename="../../../src/plugins/setupwizard/pages/opendpage.ui"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
@ -13498,7 +13512,7 @@ p, li { white-space: pre-wrap; }
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;Setup wizard is completed.&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;Setup wizard is completed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;This part of the setup procedure is now complete and you are one step away from completing the setup of your OpenPilot controller.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;This part of the setup procedure is now complete and you are one step away from completing the setup of your OpenPilot controller.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;To complete the setup please click the Radio Setup Wizard button below to close this wizard and go directly to the Radio Setup Wizard.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;To complete the setup please click the Radio Setup Wizard button below to close this wizard and go directly to the Radio Setup Wizard.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <translation type="vanished">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Cantarell&apos;; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Cantarell&apos;; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
@ -13507,6 +13521,25 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Cette partie de la procédure de configuration est maintenant terminée et il vous reste une étape pour arriver au terme de la configuration de votre contrôleur OpenPilot.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Cette partie de la procédure de configuration est maintenant terminée et il vous reste une étape pour arriver au terme de la configuration de votre contrôleur OpenPilot.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Pour terminer la configuration veuillez appuyer sur le bouton ci-dessous pour fermer cet assistant et aller directement à l&apos;Assistant de Configuration Radio.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Pour terminer la configuration veuillez appuyer sur le bouton ci-dessous pour fermer cet assistant et aller directement à l&apos;Assistant de Configuration Radio.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message>
<location filename="../../../src/plugins/setupwizard/pages/opendpage.ui"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Cantarell&apos;; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;Congratulations!&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;Setup wizard is completed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;This part of the setup procedure is now complete and you are one step away from completing the setup of your OpenPilot controller.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;To complete the setup please click the button below to close this wizard and go directly to the Transmitter Setup Wizard.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Cantarell&apos;; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;Félicitations !&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:12pt; font-weight:600;&quot;&gt;L&apos;Assistant de Configuration est terminé.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Cette partie de la procédure de configuration est maintenant terminée et il vous reste une étape pour arriver au terme de la configuration de votre contrôleur OpenPilot.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:10pt;&quot;&gt;Pour terminer la configuration veuillez appuyer sur le bouton ci-dessous pour fermer cet assistant et aller directement à l&apos;Assistant de Configuration Émetteur.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context> </context>
<context> <context>
<name>OPStartPage</name> <name>OPStartPage</name>
@ -15172,9 +15205,9 @@ A noter : Pour le GPS OpenPilot v8, veuillez choisir l&apos;option GPS U-Blox.</
<message> <message>
<location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="+49"/> <location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="+49"/>
<location line="+49"/> <location line="+49"/>
<location line="+31"/> <location line="+32"/>
<location line="+9"/> <location line="+9"/>
<location line="+10"/> <location line="+11"/>
<source>%1 µs</source> <source>%1 µs</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -26,18 +26,18 @@
*/ */
#include "outputcalibrationutil.h" #include "outputcalibrationutil.h"
#include "actuatorcommand.h" #include "uavobject.h"
#include "uavobjectmanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "vehicleconfigurationhelper.h" #include "vehicleconfigurationhelper.h"
#include "manualcontrolsettings.h" #include "manualcontrolsettings.h"
bool OutputCalibrationUtil::c_prepared = false;
ActuatorCommand::Metadata OutputCalibrationUtil::c_savedActuatorCommandMetaData;
OutputCalibrationUtil::OutputCalibrationUtil(QObject *parent) : OutputCalibrationUtil::OutputCalibrationUtil(QObject *parent) :
QObject(parent), m_outputChannel(-1), m_safeValue(1000) QObject(parent), m_outputChannel(-1), m_safeValue(1000)
{ {
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
m_uavObjectManager = pm->getObject<UAVObjectManager>();
Q_ASSERT(m_uavObjectManager);
} }
OutputCalibrationUtil::~OutputCalibrationUtil() OutputCalibrationUtil::~OutputCalibrationUtil()
@ -45,22 +45,26 @@ OutputCalibrationUtil::~OutputCalibrationUtil()
stopChannelOutput(); stopChannelOutput();
} }
void OutputCalibrationUtil::startChannelOutput(quint16 channel, quint16 safeValue) ActuatorCommand * OutputCalibrationUtil::getActuatorCommandObject()
{ {
if (m_outputChannel < 0 && channel < ActuatorCommand::CHANNEL_NUMELEM) { ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
// Start output... Q_ASSERT(pm);
m_outputChannel = channel;
m_safeValue = safeValue;
qDebug() << "Starting output for channel " << m_outputChannel + 1 << "..."; UAVObjectManager *uavObjectManager = pm->getObject<UAVObjectManager>();
Q_ASSERT(uavObjectManager);
ActuatorCommand *actuatorCommand = ActuatorCommand::GetInstance(m_uavObjectManager); ActuatorCommand *actuatorCommand = ActuatorCommand::GetInstance(uavObjectManager);
Q_ASSERT(actuatorCommand); Q_ASSERT(actuatorCommand);
return actuatorCommand;
}
void OutputCalibrationUtil::startOutputCalibration()
{
if (!c_prepared) {
ActuatorCommand *actuatorCommand = getActuatorCommandObject();
UAVObject::Metadata metaData = actuatorCommand->getMetadata(); UAVObject::Metadata metaData = actuatorCommand->getMetadata();
m_savedActuatorCommandMetadata = metaData; c_savedActuatorCommandMetaData = metaData;
// Store current data for later restore
m_savedActuatorCommandData = actuatorCommand->getData();
// Enable actuator control from GCS... // Enable actuator control from GCS...
// Store current metadata for later restore // Store current metadata for later restore
@ -73,41 +77,65 @@ void OutputCalibrationUtil::startChannelOutput(quint16 channel, quint16 safeValu
// Apply changes // Apply changes
actuatorCommand->setMetadata(metaData); actuatorCommand->setMetadata(metaData);
actuatorCommand->updated(); actuatorCommand->updated();
c_prepared = true;
qDebug() << "OutputCalibrationUtil started.";
}
}
qDebug() << "Output for channel " << m_outputChannel + 1 << " started."; void OutputCalibrationUtil::stopOutputCalibration()
{
if (c_prepared) {
ActuatorCommand *actuatorCommand = getActuatorCommandObject();
actuatorCommand->setMetadata(c_savedActuatorCommandMetaData);
actuatorCommand->updated();
c_prepared = false;
qDebug() << "OutputCalibrationUtil stopped.";
}
}
void OutputCalibrationUtil::startChannelOutput(quint16 channel, quint16 safeValue)
{
if (c_prepared) {
if (m_outputChannel < 0 && channel < ActuatorCommand::CHANNEL_NUMELEM) {
// Start output...
m_outputChannel = channel;
m_safeValue = safeValue;
qDebug() << "Output for channel " << m_outputChannel + 1 << " started.";
}
} else {
qDebug() << "OutputCalibrationUtil not started.";
} }
} }
void OutputCalibrationUtil::stopChannelOutput() void OutputCalibrationUtil::stopChannelOutput()
{ {
if (m_outputChannel >= 0) { if (c_prepared) {
qDebug() << "Stopping output for channel " << m_outputChannel + 1 << "..."; if (m_outputChannel >= 0) {
// Stop output... qDebug() << "Stopping output for channel " << m_outputChannel + 1 << "...";
setChannelOutputValue(m_safeValue); // Stop output...
qDebug() << "Settings output for channel " << m_outputChannel + 1 << " to " << m_safeValue; setChannelOutputValue(m_safeValue);
qDebug() << "Settings output for channel " << m_outputChannel + 1 << " to " << m_safeValue;
qDebug() << "Output for channel " << m_outputChannel + 1 << " stopped.";
// Restore metadata to what it was before m_outputChannel = -1;
ActuatorCommand *actuatorCommand = ActuatorCommand::GetInstance(m_uavObjectManager); }
Q_ASSERT(actuatorCommand); } else {
// actuatorCommand->setData(m_savedActuatorCommandData); qDebug() << "OutputCalibrationUtil not started.";
actuatorCommand->setMetadata(m_savedActuatorCommandMetadata);
actuatorCommand->updated();
qDebug() << "Output for channel " << m_outputChannel + 1 << " stopped.";
m_outputChannel = -1;
} }
} }
void OutputCalibrationUtil::setChannelOutputValue(quint16 value) void OutputCalibrationUtil::setChannelOutputValue(quint16 value)
{ {
if (m_outputChannel >= 0) { if (c_prepared) {
// Set output value if (m_outputChannel >= 0) {
qDebug() << "Setting output value for channel " << m_outputChannel << " to " << value << "."; // Set output value
ActuatorCommand *actuatorCommand = ActuatorCommand::GetInstance(m_uavObjectManager); qDebug() << "Setting output value for channel " << m_outputChannel << " to " << value << ".";
Q_ASSERT(actuatorCommand); ActuatorCommand *actuatorCommand = getActuatorCommandObject();
ActuatorCommand::DataFields data = actuatorCommand->getData(); ActuatorCommand::DataFields data = actuatorCommand->getData();
data.Channel[m_outputChannel] = value; data.Channel[m_outputChannel] = value;
actuatorCommand->setData(data); actuatorCommand->setData(data);
} else {
qDebug() << "OutputCalibrationUtil not started.";
}
} }
} }

View File

@ -29,10 +29,6 @@
#define OUTPUTCALIBRATIONUTIL_H #define OUTPUTCALIBRATIONUTIL_H
#include <QObject> #include <QObject>
#include <QList>
#include "uavobject.h"
#include "uavobjectmanager.h"
#include "vehicleconfigurationsource.h"
#include "actuatorcommand.h" #include "actuatorcommand.h"
@ -42,20 +38,20 @@ public:
explicit OutputCalibrationUtil(QObject *parent = 0); explicit OutputCalibrationUtil(QObject *parent = 0);
~OutputCalibrationUtil(); ~OutputCalibrationUtil();
signals: static void startOutputCalibration();
static void stopOutputCalibration();
static ActuatorCommand * getActuatorCommandObject();
public slots: public slots:
void startChannelOutput(quint16 channel, quint16 safeValue); void startChannelOutput(quint16 channel, quint16 safeValue);
void stopChannelOutput(); void stopChannelOutput();
void setChannelOutputValue(quint16 value); void setChannelOutputValue(quint16 value);
private: private:
static bool c_prepared;
static ActuatorCommand::Metadata c_savedActuatorCommandMetaData;
qint16 m_outputChannel; qint16 m_outputChannel;
quint16 m_safeValue; quint16 m_safeValue;
UAVObject::Metadata m_savedActuatorCommandMetadata;
ActuatorCommand::DataFields m_savedActuatorCommandData;
UAVObjectManager *m_uavObjectManager;
}; };
#endif // OUTPUTCALIBRATIONUTIL_H #endif // OUTPUTCALIBRATIONUTIL_H

View File

@ -102,6 +102,7 @@ void EscCalibrationPage::startButtonClicked()
MixerSettings *mSettings = MixerSettings::GetInstance(uavoManager); MixerSettings *mSettings = MixerSettings::GetInstance(uavoManager);
Q_ASSERT(mSettings); Q_ASSERT(mSettings);
QString mixerTypePattern = "Mixer%1Type"; QString mixerTypePattern = "Mixer%1Type";
OutputCalibrationUtil::startOutputCalibration();
for (quint32 i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) { for (quint32 i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i + 1)); UAVObjectField *field = mSettings->getField(mixerTypePattern.arg(i + 1));
Q_ASSERT(field); Q_ASSERT(field);
@ -145,6 +146,7 @@ void EscCalibrationPage::stopButtonClicked()
output->stopChannelOutput(); output->stopChannelOutput();
delete output; delete output;
} }
OutputCalibrationUtil::stopOutputCalibration();
ui->outputLevel->setText(QString(tr("%1 µs")).arg(OFF_PWM_OUTPUT_PULSE_LENGTH_MICROSECONDS)); ui->outputLevel->setText(QString(tr("%1 µs")).arg(OFF_PWM_OUTPUT_PULSE_LENGTH_MICROSECONDS));
ui->outputHigh->setEnabled(false); ui->outputHigh->setEnabled(false);
ui->outputLow->setEnabled(true); ui->outputLow->setEnabled(true);

View File

@ -30,7 +30,7 @@ p, li { white-space: pre-wrap; }
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Congratulations!&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Congratulations!&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Setup wizard is completed.&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt; font-weight:600;&quot;&gt;Setup wizard is completed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;This part of the setup procedure is now complete and you are one step away from completing the setup of your OpenPilot controller.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;This part of the setup procedure is now complete and you are one step away from completing the setup of your OpenPilot controller.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;To complete the setup please click the Radio Setup Wizard button below to close this wizard and go directly to the Radio Setup Wizard.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;To complete the setup please click the button below to close this wizard and go directly to the Transmitter Setup Wizard.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@ -53,14 +53,14 @@ p, li { white-space: pre-wrap; }
<property name="icon"> <property name="icon">
<iconset resource="../wizardResources.qrc"> <iconset resource="../wizardResources.qrc">
<normaloff>:/setupwizard/resources/bttn-txwizard-off.png</normaloff> <normaloff>:/setupwizard/resources/bttn-txwizard-off.png</normaloff>
<normalon>:/setupwizard/resources/bttn-txwizard-on.png</normalon> <normalon>:/setupwizard/resources/bttn-txwizard-off.png</normalon>
<activeoff>:/setupwizard/resources/bttn-txwizard-off.png</activeoff> <activeoff>:/setupwizard/resources/bttn-txwizard-on.png</activeoff>
<activeon>:/setupwizard/resources/bttn-txwizard-off.png</activeon>:/setupwizard/resources/bttn-txwizard-off.png</iconset> <activeon>:/setupwizard/resources/bttn-txwizard-on.png</activeon>:/setupwizard/resources/bttn-txwizard-off.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>200</width> <width>300</width>
<height>100</height> <height>120</height>
</size> </size>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">

View File

@ -274,7 +274,6 @@ void OutputCalibrationPage::setupVehicleHighlightedPart()
void OutputCalibrationPage::setWizardPage() void OutputCalibrationPage::setWizardPage()
{ {
qDebug() << "Wizard index: " << m_currentWizardIndex; qDebug() << "Wizard index: " << m_currentWizardIndex;
m_calibrationUtil->stopChannelOutput();
QApplication::processEvents(); QApplication::processEvents();
@ -386,6 +385,7 @@ void OutputCalibrationPage::onStartButtonToggle(QAbstractButton *button, quint16
if (checkAlarms()) { if (checkAlarms()) {
enableButtons(false); enableButtons(false);
enableServoSliders(true); enableServoSliders(true);
OutputCalibrationUtil::startOutputCalibration();
m_calibrationUtil->startChannelOutput(channel, safeValue); m_calibrationUtil->startChannelOutput(channel, safeValue);
slider->setValue(value); slider->setValue(value);
m_calibrationUtil->setChannelOutputValue(value); m_calibrationUtil->setChannelOutputValue(value);
@ -394,6 +394,7 @@ void OutputCalibrationPage::onStartButtonToggle(QAbstractButton *button, quint16
} }
} else { } else {
m_calibrationUtil->stopChannelOutput(); m_calibrationUtil->stopChannelOutput();
OutputCalibrationUtil::stopOutputCalibration();
enableServoSliders(false); enableServoSliders(false);
enableButtons(true); enableButtons(true);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 18 KiB