1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00

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

This commit is contained in:
Fredrik Larsson 2014-10-26 01:14:35 +11:00
commit 9027c15424
21 changed files with 1769 additions and 140 deletions

View File

@ -0,0 +1 @@
This folder is here to host downloaded or bundled vehicle settings template files (.optmpl).

View File

@ -0,0 +1 @@
This folder is here to host downloaded or bundled vehicle settings template files (.optmpl).

View File

@ -0,0 +1 @@
This folder is here to host downloaded or bundled vehicle settings template files (.optmpl).

View File

@ -0,0 +1 @@
This folder is here to host downloaded or bundled vehicle settings template files (.optmpl).

View File

@ -0,0 +1 @@
This folder is here to host downloaded or bundled vehicle settings template files (.optmpl).

View File

@ -1 +1 @@
<html>Here you will find help for tunning Attitude Stabilization</html> <html>Here you will find help for tuning Attitude Stabilization</html>

View File

@ -1 +1 @@
<html>Here you will find help for tunning Attitude Stabilization</html> <html>Here you will find help for tuning Attitude Stabilization</html>

View File

@ -890,7 +890,7 @@ Item {
Text { Text {
text: ["FixedWing", "FixedWingElevon", "FixedWingVtail", "VTOL", "HeliCP", "QuadX", "QuadP", text: ["FixedWing", "FixedWingElevon", "FixedWingVtail", "VTOL", "HeliCP", "QuadX", "QuadP",
"Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax", "QuadH", "Hexa+", "Octo+", "Custom", "HexaX", "HexaH", "OctoV", "OctoCoaxP", "OctoCoaxX", "OctoX", "HexaCoax",
"Tricopter", "GroundVehicleCar", "GroundVehicleDiff", "GroundVehicleMoto"][SystemSettings.AirframeType] "Tricopter", "GroundVehicleCar", "GroundVehicleDiff", "GroundVehicleMoto"][SystemSettings.AirframeType]
anchors.right: parent.right anchors.right: parent.right
color: "white" color: "white"

View File

@ -23,12 +23,12 @@ Item {
property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey", property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey",
"green", "green", "green", "cyan"] "green", "green", "green", "cyan"]
// SystemSettings.AirframeType 3 - 17 : VtolPathFollower, check ThrustControl // SystemSettings.AirframeType 3 - 18 : VtolPathFollower, check ThrustControl
property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust : property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust :
FlightStatus.FlightMode > 7 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 18 FlightStatus.FlightMode > 7 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 19
&& VtolPathFollowerSettings.ThrustControl == 1 ? 12 : && VtolPathFollowerSettings.ThrustControl == 1 ? 13 :
FlightStatus.FlightMode > 7 && SystemSettings.AirframeType < 3 ? 12: 0 FlightStatus.FlightMode > 7 && SystemSettings.AirframeType < 3 ? 13: 0
property real flight_time: Math.round(SystemStats.FlightTime / 1000) property real flight_time: Math.round(SystemStats.FlightTime / 1000)

View File

@ -2723,7 +2723,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location/> <location/>
<source>This space shows a description of the selected UAVObject.</source> <source>This space shows a description of the selected UAVObject.</source>
<translation type="unfinished"></translation> <translation>Cet espace affiche une description de l&apos;UAVObject sélectionné.</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2757,7 +2757,7 @@ uniquement lorsque les valeurs changent</translation>
<message> <message>
<location/> <location/>
<source>Unknown object color:</source> <source>Unknown object color:</source>
<translation type="unfinished"></translation> <translation>Couleur d&apos;objet inconnu :</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2777,8 +2777,8 @@ uniquement lorsque les valeurs changent</translation>
</message> </message>
<message> <message>
<location line="+17"/> <location line="+17"/>
<source>Radio Setup Wizard</source> <source>Transmitter Setup Wizard</source>
<translation>Assistant Configuration Radio</translation> <translation>Assistant Configuration Émetteur</translation>
</message> </message>
</context> </context>
<context> <context>
@ -4236,12 +4236,12 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location/> <location/>
<source>Vehicle name</source> <source>Vehicle name</source>
<translation type="unfinished"></translation> <translation>Nom Véhicule</translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>Enter name of vehicle. Max 20 characters.</source> <source>Enter name of vehicle. Max 20 characters.</source>
<translation type="unfinished"></translation> <translation>Entrez le nom du véhicule : 20 caractères maximum.</translation>
</message> </message>
<message> <message>
<location/> <location/>
@ -4258,7 +4258,19 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Beware: Feed Forward Tuning will launch all engines around mid-throttle, you have been warned!&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Beware: Feed Forward Tuning will launch all engines around mid-throttle, you have been warned!&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;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Remove your props initially, and for fine-tuning, make sure your airframe is safely held in place. Wear glasses and protect your face and body.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&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;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Remove your props initially, and for fine-tuning, make sure your airframe is safely held in place. Wear glasses and protect your face and body.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <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;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Ubuntu&apos;; font-size:14pt; font-weight:600; color:#ff0000;&quot;&gt;LA MISE EN PLACE DE FEED FORWARD EXIGE DE LA PRUDENCE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Attention : L&apos;activation du réglage Feed Forward lancera tous les moteurs à mi-gaz, vous avez é averti !&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;Lucida Grande&apos;; font-size:13pt;&quot;&gt;Dans un premier temps retirez vos hélices, puis pour affiner assurez-vous que le châssis est maintenu bien en place. Portez des lunettes et protégez-vous le visage et le corps.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
</context> </context>
<context> <context>
@ -4728,7 +4740,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location/> <location/>
<source>Pitch</source> <source>Pitch</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
@ -4744,27 +4756,27 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location/> <location/>
<source>RateKi</source> <source>RateKi</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>AttitudeKp</source> <source>AttitudeKp</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>RateKp</source> <source>RateKp</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>AttitudeKi</source> <source>AttitudeKi</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>Roll</source> <source>Roll</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location/> <location/>
@ -7991,11 +8003,6 @@ Useful if you have accidentally changed some settings.</source>
<source>Use Advanced Configuration</source> <source>Use Advanced Configuration</source>
<translation>Utiliser Configuration Avancée</translation> <translation>Utiliser Configuration Avancée</translation>
</message> </message>
<message>
<location/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How fast the vehicle should climb or descent to compensate a certain altitude difference. higher values could result in more accurate altitude hold but also more violent control actions, lower values are safer and ensure smoother flight. The default value should be fine for the majority of crafts.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Détermine la vitesse à laquelle doit monter ou descendre le véhicule pour compenser une certaine différence d&apos;altitude. Des valeurs plus élevées pourraient entraîner un maintien d&apos;altitude plus précis mais aussi des réactions plus violentes, des valeurs inférieures sont plus sûres et donnent un vol plus doux. La valeur par défaut devrait être bonne pour la plupart des appareils.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message> <message>
<location/> <location/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How much the vehicle should throttle up or down to compensate or achieve a certain vertical speed. Higher values lead to more aggressive throttle changes and could lead to oscillations. This is the most likely candidate to change depending on the crafts engine thrust. Heavy craft with weak engines might require higher values.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How much the vehicle should throttle up or down to compensate or achieve a certain vertical speed. Higher values lead to more aggressive throttle changes and could lead to oscillations. This is the most likely candidate to change depending on the crafts engine thrust. Heavy craft with weak engines might require higher values.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
@ -8362,6 +8369,11 @@ response (deg)</source>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This adjusts how much yaw stability your vehicle will have in Rate mode. A good starting point for Integral is double the Proportional value&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This adjusts how much yaw stability your vehicle will have in Rate mode. A good starting point for Integral is double the Proportional value&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ceci ajuste le niveau de stabilité en lacet de votre véhicule en mode Rate. Un bon point de départ pour l&apos;Intégrale est le double de la valeur Proportionnel&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ceci ajuste le niveau de stabilité en lacet de votre véhicule en mode Rate. Un bon point de départ pour l&apos;Intégrale est le double de la valeur Proportionnel&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message>
<location/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How fast the vehicle should climb or descent to compensate a certain altitude difference. Higher values could result in more accurate altitude hold but also more violent control actions, lower values are safer and ensure smoother flight. The default value should be fine for the majority of crafts.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Détermine la vitesse à laquelle doit monter ou descendre le véhicule pour compenser une certaine différence d&apos;altitude. Des valeurs plus élevées pourraient entraîner un maintien d&apos;altitude plus précis mais aussi des réactions plus violentes, des valeurs inférieures sont plus sûres et donnent un vol plus doux. La valeur par défaut devrait être bonne pour la plupart des appareils.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context> </context>
<context> <context>
<name>TxPIDWidget</name> <name>TxPIDWidget</name>
@ -9200,7 +9212,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location/> <location/>
<location filename="../../../src/plugins/setupwizard/pages/controllerpage.cpp" line="+198"/> <location filename="../../../src/plugins/setupwizard/pages/controllerpage.cpp" line="+201"/>
<source>Connect</source> <source>Connect</source>
<translation>Connecter</translation> <translation>Connecter</translation>
</message> </message>
@ -10976,7 +10988,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<context> <context>
<name>SetupWizard</name> <name>SetupWizard</name>
<message> <message>
<location filename="../../../src/plugins/setupwizard/setupwizard.cpp" line="+63"/> <location filename="../../../src/plugins/setupwizard/setupwizard.cpp" line="+64"/>
<source>OpenPilot Setup Wizard</source> <source>OpenPilot Setup Wizard</source>
<translation>Assistant Configuration OpenPilot</translation> <translation>Assistant Configuration OpenPilot</translation>
</message> </message>
@ -12794,12 +12806,12 @@ Méfiez-vous de ne pas vous verrouiller l&apos;accès !</translation>
<message> <message>
<location/> <location/>
<source>Resets</source> <source>Resets</source>
<translation type="unfinished">Réinitialisations</translation> <translation>Réinitialisations</translation>
</message> </message>
<message> <message>
<location/> <location/>
<source>Timeouts</source> <source>Timeouts</source>
<translation type="unfinished">Temps Dépassé</translation> <translation>Temps Dépassé</translation>
</message> </message>
<message> <message>
<location/> <location/>
@ -13604,7 +13616,7 @@ p, li { white-space: pre-wrap; }
<translation>Activité Projet</translation> <translation>Activité Projet</translation>
</message> </message>
<message> <message>
<location line="+130"/> <location line="+131"/>
<source>Commented on </source> <source>Commented on </source>
<translation>Commenté sur </translation> <translation>Commenté sur </translation>
</message> </message>
@ -14006,7 +14018,7 @@ Veuillez vérifier le fichier.
<context> <context>
<name>MonitorWidget</name> <name>MonitorWidget</name>
<message> <message>
<location filename="../../../src/plugins/telemetry/monitorwidget.cpp" line="+216"/> <location filename="../../../src/plugins/telemetry/monitorwidget.cpp" line="+218"/>
<source>Connected</source> <source>Connected</source>
<translation>Connecté</translation> <translation>Connecté</translation>
</message> </message>
@ -14435,7 +14447,7 @@ et même conduire au crash. A utiliser avec prudence.</translation>
<context> <context>
<name>TelemetryPlugin</name> <name>TelemetryPlugin</name>
<message> <message>
<location filename="../../../src/plugins/telemetry/telemetryplugin.cpp" line="+157"/> <location filename="../../../src/plugins/telemetry/telemetryplugin.cpp" line="+149"/>
<source>Firmware Version Mismatch!</source> <source>Firmware Version Mismatch!</source>
<translation>Incompatibilité des Versions de Firmware !</translation> <translation>Incompatibilité des Versions de Firmware !</translation>
</message> </message>
@ -14564,7 +14576,7 @@ et même conduire au crash. A utiliser avec prudence.</translation>
<context> <context>
<name>ConfigRevoWidget</name> <name>ConfigRevoWidget</name>
<message> <message>
<location filename="../../../src/plugins/config/configrevowidget.cpp" line="+329"/> <location filename="../../../src/plugins/config/configrevowidget.cpp" line="+331"/>
<source>Temperature: %1°C</source> <source>Temperature: %1°C</source>
<translation>Température : %1°C</translation> <translation>Température : %1°C</translation>
</message> </message>
@ -14586,23 +14598,6 @@ et même conduire au crash. A utiliser avec prudence.</translation>
<source>WizardPage</source> <source>WizardPage</source>
<translation>Page d&apos;Assistant</translation> <translation>Page d&apos;Assistant</translation>
</message> </message>
<message>
<location/>
<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;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Initial Tuning&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif&apos;;&quot;&gt;This section of the OpenPilot Wizard allows you to select a set of initial tunning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.&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;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Réglages de Départ&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif&apos;;&quot;&gt;Cette partie de l&apos;assistant de configuration vous permet de sélectionner des paramètres prédéfinis pour votre appareil. Vous trouverez ci-dessous une liste d&apos;appareils couramment utilisés, sélectionnez-en un qui correspond le mieux à votre appareil ou un modèle générique si vous avez un doute.&lt;/span&gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message> <message>
<location/> <location/>
<source>Information about the Vehicle in short.</source> <source>Information about the Vehicle in short.</source>
@ -14665,13 +14660,34 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>No vehicle selected!</source> <source>This option will use the current tuning settings saved on the controller, if your controller is currently unconfigured, then the OpenPilot firmware defaults will be used.
<translation>Pas de véhicule sélectionné !</translation>
It is suggested that if this is a first time configuration of your controller, rather than use this option, instead select a tuning set that matches your own airframe as close as possible from the list above or if you are not able to fine one, then select the generic item from the list.</source>
<translation>Cette option utilise les paramètres de réglage actuels enregistrés dans la carte, si votre contrôleur n&apos;est pas actuellement configuré, alors les paramètres par défaut du firmware OpenPilot seront utilisés.
Il est suggéré que si cela est une première configuration de votre contrôleur, plutôt que d&apos;utiliser cette option, sélectionnez à la place un ensemble de réglages qui correspond le mieux à votre propre appareil dans la liste ci-dessus. Si vous n&apos;êtes pas en mesure d&apos;en choisir un, sélectionnez l&apos;élément générique de la liste.</translation>
</message> </message>
<message> <message>
<location line="+48"/> <location line="+59"/>
<source>None</source> <source>Current Tuning</source>
<translation>Aucun</translation> <translation>Réglages Actuels</translation>
</message>
<message>
<location filename="../../../src/plugins/setupwizard/pages/airframeinitialtuningpage.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;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Initial Tuning&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif&apos;;&quot;&gt;This section of the OpenPilot Wizard allows you to select a set of initial tuning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.&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;MS Shell Dlg 2&apos;; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Réglages de Départ&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif&apos;;&quot;&gt;Cette partie de l&apos;assistant de configuration vous permet de sélectionner des paramètres prédéfinis pour votre appareil. Vous trouverez ci-dessous une liste d&apos;appareils couramment utilisés, sélectionnez-en un qui correspond le mieux à votre appareil ou un modèle générique si vous avez un doute.&lt;/span&gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
</context> </context>
<context> <context>
@ -14972,11 +14988,6 @@ p, li { white-space: pre-wrap; }
<source>Cancel</source> <source>Cancel</source>
<translation>Annuler</translation> <translation>Annuler</translation>
</message> </message>
<message>
<location/>
<source>Ok</source>
<translation></translation>
</message>
<message> <message>
<location filename="../../../src/plugins/setupwizard/vehicletemplateexportdialog.cpp" line="+87"/> <location filename="../../../src/plugins/setupwizard/vehicletemplateexportdialog.cpp" line="+87"/>
<source>Fixed Wing - Aileron</source> <source>Fixed Wing - Aileron</source>
@ -15058,23 +15069,25 @@ p, li { white-space: pre-wrap; }
<translation>Non Supporté</translation> <translation>Non Supporté</translation>
</message> </message>
<message> <message>
<location line="+65"/> <location line="+43"/>
<source>Settings were exported to <source>Export settings</source>
%1</source> <translation>Exporter réglages</translation>
<translation>Les paramètres ont é exportés vers
%1</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+0"/>
<source>OPTemplates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+11"/>
<source>Settings could not be exported to <source>Settings could not be exported to
%1. %1(%2).
Please try again.</source> Please try again.</source>
<translation>Les paramètres n&apos;ont pas é exportés vers <translation>Les réglages ne peuvent être exportés vers
%1. %1(%2).</translation>
Veuillez essayer à nouveau.</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+9"/>
<source>Import Image</source> <source>Import Image</source>
<translation>Importer Image</translation> <translation>Importer Image</translation>
</message> </message>
@ -15083,6 +15096,11 @@ Veuillez essayer à nouveau.</translation>
<source>Images (*.png *.jpg)</source> <source>Images (*.png *.jpg)</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../../../src/plugins/setupwizard/vehicletemplateexportdialog.ui"/>
<source>Export</source>
<translation>Exporter</translation>
</message>
</context> </context>
<context> <context>
<name>AirSpeedPage</name> <name>AirSpeedPage</name>
@ -15186,33 +15204,33 @@ Veuillez sélectionner votre type de GPS ci-dessous :</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Select this option to use the OpenPilot Platinum GPS with integrated Magnetometer and Microcontroller connected to the Main Port of your controller. <source>Select this option to use the OpenPilot Platinum GPS with integrated Magnetometer and Microcontroller.
Note: for the OpenPilot v8 GPS please select the U-Blox option.</source> Note: for the OpenPilot v8 GPS please select the U-Blox option.</source>
<translation>Sélectionnez cette option pour utiliser le GPS OpenPilot Platinum avec Magnétomètre et Microcontrôleur intégré connecté sur le Main Port de votre contrôleur. <translation>Sélectionnez cette option pour utiliser le GPS OpenPilot Platinum avec Magnétomètre et Microcontrôleur intégré.
A noter : Pour le GPS OpenPilot v8, veuillez choisir l&apos;option GPS U-Blox.</translation> A noter : Pour le GPS OpenPilot v8, veuillez choisir l&apos;option GPS U-Blox.</translation>
</message> </message>
<message> <message>
<location line="+6"/> <location line="+7"/>
<source>U-Blox Based</source> <source>Select this option for the OpenPilot V8 GPS or generic U-Blox chipset based GPS.</source>
<translation>Basé sur U-Blox</translation> <translation>Sélectionnez cette option pour utiliser le GPS OpenPilot v8 ou un GPS U-Blox générique.</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+5"/>
<source>Select this option for the OpenPilot V8 GPS or generic U-Blox chipset GPSs connectedto the Main Port of your controller.</source> <source>Select this option for a generic NMEA based GPS.</source>
<translation>Sélectionnez cette option pour utiliser le GPS OpenPilot v8 ou un GPS U-Blox générique connecté sur le Main Port de votre contrôleur.</translation> <translation>Sélectionnez cette option pour utiliser un GPS NMEA générique.</translation>
</message>
<message>
<location line="-6"/>
<source>U-Blox Based</source>
<translation>Basé sur U-Blox</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>NMEA Based</source> <source>NMEA Based</source>
<translation>Basé sur NMEA</translation> <translation>Basé sur NMEA</translation>
</message> </message>
<message>
<location line="+1"/>
<source>Select this option for a generic NMEA based GPS connected to the Main Port of yourcontroller.</source>
<translation>Sélectionnez cette option pour utiliser un GPS NMEA générique connecté sur le Main Port de votre contrôleur.</translation>
</message>
</context> </context>
<context> <context>
<name>EscCalibrationPage</name> <name>EscCalibrationPage</name>
@ -15223,12 +15241,20 @@ A noter : Pour le GPS OpenPilot v8, veuillez choisir l&apos;option GPS U-Blox.</
</message> </message>
<message> <message>
<location/> <location/>
<location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="+113"/> <location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="+136"/>
<source>Start</source> <source>Start</source>
<translation>Démarrer</translation> <translation>Démarrer</translation>
</message> </message>
<message> <message>
<location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="-12"/> <location filename="../../../src/plugins/setupwizard/pages/esccalibrationpage.cpp" line="-87"/>
<location line="+46"/>
<location line="+26"/>
<location line="+9"/>
<source>%1 µs</source>
<translation></translation>
</message>
<message>
<location line="-18"/>
<source>Stop</source> <source>Stop</source>
<translation>Arrêter</translation> <translation>Arrêter</translation>
</message> </message>
@ -15245,7 +15271,7 @@ A noter : Pour le GPS OpenPilot v8, veuillez choisir l&apos;option GPS U-Blox.</
<message> <message>
<location/> <location/>
<source>The vehicle is NOT powered by any external power source but USB</source> <source>The vehicle is NOT powered by any external power source but USB</source>
<translation>L&apos;appareil N&apos;EST PAS BRANCHE sur une source d&apos;alimentation externe <translation type="unfinished">L&apos;appareil N&apos;EST PAS BRANCHÉ sur une source d&apos;alimentation externe
mais uniquement sur port USB</translation> mais uniquement sur port USB</translation>
</message> </message>
<message> <message>
@ -15253,6 +15279,26 @@ mais uniquement sur port USB</translation>
<source>I confirm I have read and understood the above instructions in full</source> <source>I confirm I have read and understood the above instructions in full</source>
<translation>Je confirme avoir lu et compris les instructions ci-dessus en totalité</translation> <translation>Je confirme avoir lu et compris les instructions ci-dessus en totalité</translation>
</message> </message>
<message>
<location/>
<source>ESC Output Level</source>
<translation>Niveau Sortie ESC</translation>
</message>
<message>
<location/>
<source>Low/Off</source>
<translation>Bas / Arrêté</translation>
</message>
<message>
<location/>
<source>N/A</source>
<translation type="unfinished"></translation>
</message>
<message>
<location/>
<source>High</source>
<translation>Haut</translation>
</message>
</context> </context>
<context> <context>
<name>UAVObjectBrowserWidget</name> <name>UAVObjectBrowserWidget</name>
@ -15302,7 +15348,7 @@ mais uniquement sur port USB</translation>
<message> <message>
<location line="-53"/> <location line="-53"/>
<source>Multi</source> <source>Multi</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>

View File

@ -101,7 +101,7 @@ void AirframeInitialTuningPage::updatePhoto(QJsonObject *templ)
if (m_photoItem != NULL) { if (m_photoItem != NULL) {
ui->templateImage->scene()->removeItem(m_photoItem); ui->templateImage->scene()->removeItem(m_photoItem);
} }
if (templ != NULL) { if (templ != NULL && !templ->value("photo").isUndefined()) {
QByteArray imageData = QByteArray::fromBase64(templ->value("photo").toString().toLatin1()); QByteArray imageData = QByteArray::fromBase64(templ->value("photo").toString().toLatin1());
photo.loadFromData(imageData, "PNG"); photo.loadFromData(imageData, "PNG");
} else { } else {
@ -136,7 +136,7 @@ void AirframeInitialTuningPage::updateDescription(QJsonObject *templ)
ui->templateDescription->setText(tr("This option will use the current tuning settings saved on the controller, if your controller " ui->templateDescription->setText(tr("This option will use the current tuning settings saved on the controller, if your controller "
"is currently unconfigured, then the OpenPilot firmware defaults will be used.\n\n" "is currently unconfigured, then the OpenPilot firmware defaults will be used.\n\n"
"It is suggested that if this is a first time configuration of your controller, rather than " "It is suggested that if this is a first time configuration of your controller, rather than "
"use this option, instead select a tunning set that matches your own airframe as close as " "use this option, instead select a tuning set that matches your own airframe as close as "
"possible from the list above or if you are not able to fine one, then select the generic item " "possible from the list above or if you are not able to fine one, then select the generic item "
"from the list.")); "from the list."));
} }
@ -170,14 +170,20 @@ void AirframeInitialTuningPage::loadValidFiles()
if (file.open(QFile::ReadOnly)) { if (file.open(QFile::ReadOnly)) {
QByteArray jsonData = file.readAll(); QByteArray jsonData = file.readAll();
QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData); QJsonParseError error;
QJsonObject json = templateDoc.object(); QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData, &error);
if (json["type"].toInt() == getWizard()->getVehicleType() && if (error.error == QJsonParseError::NoError) {
json["subtype"].toInt() == getWizard()->getVehicleSubType()) { QJsonObject json = templateDoc.object();
QString uuid = json["uuid"].toString(); if (json["type"].toInt() == getWizard()->getVehicleType() &&
if (!m_templates.contains(uuid)) { json["subtype"].toInt() == getWizard()->getVehicleSubType()) {
m_templates[json["uuid"].toString()] = new QJsonObject(json); QString uuid = json["uuid"].toString();
if (!m_templates.contains(uuid)) {
m_templates[json["uuid"].toString()] = new QJsonObject(json);
}
} }
} else {
qDebug() << "Error parsing json file: "
<< fileName << ". Error was:" << error.errorString();
} }
} }
file.close(); file.close();

View File

@ -23,7 +23,7 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Initial Tuning&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Initial Tuning&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif';&quot;&gt;This section of the OpenPilot Wizard allows you to select a set of initial tunning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.&lt;/span&gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; 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,sans-serif';&quot;&gt;This section of the OpenPilot Wizard allows you to select a set of initial tuning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.&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>

View File

@ -376,7 +376,12 @@ void OutputCalibrationPage::on_motorNeutralButton_toggled(bool checked)
ui->motorNeutralButton->setText(checked ? tr("Stop") : tr("Start")); ui->motorNeutralButton->setText(checked ? tr("Stop") : tr("Start"));
ui->motorNeutralSlider->setEnabled(checked); ui->motorNeutralSlider->setEnabled(checked);
quint16 channel = getCurrentChannel(); quint16 channel = getCurrentChannel();
quint16 safeValue = m_actuatorSettings[channel].channelNeutral; quint16 safeValue = 0;
if (!checked) {
// Set pwm output to 1000/low for 500ms before turning it to 0
m_calibrationUtil->setChannelOutputValue(1000);
QThread::msleep(500);
}
onStartButtonToggle(ui->motorNeutralButton, channel, m_actuatorSettings[channel].channelNeutral, safeValue, ui->motorNeutralSlider); onStartButtonToggle(ui->motorNeutralButton, channel, m_actuatorSettings[channel].channelNeutral, safeValue, ui->motorNeutralSlider);
} }

View File

@ -56,10 +56,11 @@
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(), SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(),
m_controllerType(CONTROLLER_UNKNOWN), m_controllerType(CONTROLLER_UNKNOWN),
m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN), m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN),
m_servoType(SERVO_UNKNOWN), m_vehicleTemplate(NULL), m_escType(ESC_UNKNOWN), m_servoType(SERVO_UNKNOWN),
m_gpsType(GPS_DISABLED), m_airspeedType(AIRSPEED_DISABLED), m_airspeedType(AIRSPEED_DISABLED), m_gpsType(GPS_DISABLED),
m_calibrationPerformed(false), m_restartNeeded(false), m_connectionManager(0) m_vehicleTemplate(NULL), m_calibrationPerformed(false),
m_restartNeeded(false), m_connectionManager(NULL)
{ {
setWindowTitle(tr("OpenPilot Setup Wizard")); setWindowTitle(tr("OpenPilot Setup Wizard"));
setOption(QWizard::IndependentPages, false); setOption(QWizard::IndependentPages, false);

View File

@ -172,7 +172,6 @@ QString VehicleTemplateExportDialog::fixFilenameString(QString input, int trunca
.left(truncate); .left(truncate);
} }
void VehicleTemplateExportDialog::accept() void VehicleTemplateExportDialog::accept()
{ {
QJsonObject exportObject; QJsonObject exportObject;
@ -202,33 +201,53 @@ void VehicleTemplateExportDialog::accept()
QUuid uuid = QUuid::createUuid(); QUuid uuid = QUuid::createUuid();
exportObject["uuid"] = uuid.toString(); exportObject["uuid"] = uuid.toString();
QByteArray bytes; if (!m_image.isNull()) {
QBuffer buffer(&bytes); QByteArray bytes;
buffer.open(QIODevice::WriteOnly); QBuffer buffer(&bytes);
m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio, buffer.open(QIODevice::WriteOnly);
Qt::SmoothTransformation).save(&buffer, "PNG"); m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio,
exportObject["photo"] = QString::fromLatin1(bytes.toBase64().data()); Qt::SmoothTransformation).save(&buffer, "PNG");
exportObject["photo"] = QString::fromLatin1(bytes.toBase64().data());
}
QJsonDocument saveDoc(exportObject); QJsonDocument saveDoc(exportObject);
QString fileName = QString("%1/%2/%3-%4-%5.optmpl") const char *fileType = ".optmpl";
.arg(EXPORT_BASE_NAME)
.arg(getTypeDirectory()) QString fileName = QString("%1-%2-%3%4")
.arg(fixFilenameString(ui->Name->text(), 20)) .arg(fixFilenameString(ui->Name->text(), 20))
.arg(fixFilenameString(ui->Type->text(), 30)) .arg(fixFilenameString(ui->Type->text(), 30))
.arg(fixFilenameString(uuid.toString().right(12))); .arg(fixFilenameString(uuid.toString().right(12)))
QFile saveFile(fileName); .arg(fileType);
QDir dir;
dir.mkpath(QFileInfo(saveFile).absoluteDir().absolutePath()); QString fullPath = QString("%1%2%3%4%5")
if (saveFile.open(QIODevice::WriteOnly)) { .arg(EXPORT_BASE_NAME)
saveFile.write(saveDoc.toJson()); .arg(QDir::separator())
saveFile.close(); .arg(getTypeDirectory())
QMessageBox::information(this, "Export", tr("Settings were exported to \n%1").arg(QFileInfo(saveFile).absoluteFilePath()), QMessageBox::Ok); .arg(QDir::separator())
} else { .arg(fileName);
QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1.\nPlease try again.")
.arg(QFileInfo(saveFile).absoluteFilePath()), QMessageBox::Ok); QDir dir = QFileInfo(QFile(fullPath)).absoluteDir();
if (!dir.exists()) {
fullPath = QString("%1%2%3").arg(QDir::homePath(), QDir::separator(), fileName);
}
fullPath = QFileDialog::getSaveFileName(this, tr("Export settings"), fullPath, QString("%1 (*%2)").arg(tr("OPTemplates", fileType)));
if (!fullPath.isEmpty()) {
if (!fullPath.endsWith(fileType)) {
fullPath.append(fileType);
}
QFile saveFile(fullPath);
if (saveFile.open(QIODevice::WriteOnly)) {
saveFile.write(saveDoc.toJson());
saveFile.close();
} else {
QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1(%2).\nPlease try again.")
.arg(QFileInfo(saveFile).absoluteFilePath(), saveFile.error()), QMessageBox::Ok);
}
QDialog::accept();
} }
QDialog::accept();
} }
void VehicleTemplateExportDialog::importImage() void VehicleTemplateExportDialog::importImage()

View File

@ -66,9 +66,9 @@ private:
VehicleConfigurationSource::VEHICLE_SUB_TYPE m_subType; VehicleConfigurationSource::VEHICLE_SUB_TYPE m_subType;
QPixmap m_image; QPixmap m_image;
QString fixFilenameString(QString input, int truncate = 100);
QString getTypeDirectory(); QString getTypeDirectory();
QString setupVehicleType(); QString setupVehicleType();
QString fixFilenameString(QString input, int truncate = 100);
}; };
#endif // VEHICLETEMPLATEEXPORTDIALOG_H #endif // VEHICLETEMPLATEEXPORTDIALOG_H

View File

@ -98,7 +98,7 @@ QGraphicsTextItem *createTextItem(QGraphicsSvgItem *parent, QString elementId, Q
MonitorWidget::MonitorWidget(QWidget *parent) : MonitorWidget::MonitorWidget(QWidget *parent) :
QGraphicsView(parent), aspectRatioMode(Qt::KeepAspectRatio) QGraphicsView(parent), aspectRatioMode(Qt::KeepAspectRatio)
{ {
setMinimumSize(180, 25); setMinimumSize(195, 25);
QGraphicsScene *scene = new QGraphicsScene(); QGraphicsScene *scene = new QGraphicsScene();
@ -110,6 +110,8 @@ MonitorWidget::MonitorWidget(QWidget *parent) :
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setStyleSheet("QGraphicsView{background:transparent;}");
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor())); setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);

View File

@ -68,20 +68,12 @@ bool TelemetryPlugin::initialize(const QStringList & args, QString *errMsg)
// TODO not so good... g is probalby leaked... // TODO not so good... g is probalby leaked...
MonitorWidget *w = mf->createMonitorWidget(NULL); MonitorWidget *w = mf->createMonitorWidget(NULL);
w->setMaximumWidth(180); w->setMaximumWidth(195);
//
// setAlignment(Qt::AlignCenter);
// no border // no border
w->setFrameStyle(QFrame::NoFrame); w->setFrameStyle(QFrame::NoFrame);
w->setWindowFlags(Qt::FramelessWindowHint); w->setWindowFlags(Qt::FramelessWindowHint);
// set svg background translucent
w->setStyleSheet("background:transparent;");
// set widget background translucent
w->setAttribute(Qt::WA_TranslucentBackground);
w->setBackgroundBrush(Qt::NoBrush); w->setBackgroundBrush(Qt::NoBrush);
// add monitor widget to connection manager // add monitor widget to connection manager

View File

@ -52,10 +52,14 @@ WelcomePlugin::WelcomePlugin()
WelcomePlugin::~WelcomePlugin() WelcomePlugin::~WelcomePlugin()
{ {
// The below code is commented out to avoid having the application
// crash when it is terminated. TODO: Fix a real solution.
/*
if (m_welcomeMode) { if (m_welcomeMode) {
removeObject(m_welcomeMode); removeObject(m_welcomeMode);
delete m_welcomeMode; delete m_welcomeMode;
} }
*/
} }
/*! Initializes the plugin. Returns true on success. /*! Initializes the plugin. Returns true on success.

View File

@ -2,8 +2,8 @@
<object name="MixerSettings" singleinstance="true" settings="true" category="Control"> <object name="MixerSettings" singleinstance="true" settings="true" category="Control">
<description>Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType</description> <description>Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType</description>
<field name="MaxAccel" units="units/sec" type="float" elements="1" defaultvalue="1000"/> <field name="MaxAccel" units="units/sec" type="float" elements="1" defaultvalue="1000"/>
<field name="MixerValueRoll" units="percent" type="int8" elements="1" defaultvalue="100"/> <field name="MixerValueRoll" units="percent" type="int8" elements="1" defaultvalue="50"/>
<field name="MixerValuePitch" units="percent" type="int8" elements="1" defaultvalue="100"/> <field name="MixerValuePitch" units="percent" type="int8" elements="1" defaultvalue="50"/>
<field name="MixerValueYaw" units="percent" type="int8" elements="1" defaultvalue="50"/> <field name="MixerValueYaw" units="percent" type="int8" elements="1" defaultvalue="50"/>
<field name="FeedForward" units="" type="float" elements="1" defaultvalue="0"/> <field name="FeedForward" units="" type="float" elements="1" defaultvalue="0"/>
<field name="AccelTime" units="ms" type="float" elements="1" defaultvalue="0"/> <field name="AccelTime" units="ms" type="float" elements="1" defaultvalue="0"/>