1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Merge branch 'master' into OP-499_216_Saving

This commit is contained in:
James Cotton 2011-05-15 03:58:30 -05:00
commit 886f36dca1
7 changed files with 117 additions and 104 deletions

View File

@ -105,6 +105,11 @@ C: Gary Mortimer and the Scorpion
D: March 2011
V: http://vimeo.com/22104334
M: First Y6 OpenPilot flight
C: Sami Korhonen (Sambas)
D: May 2011
V: http://www.vimeo.com/23637586
M: First CopterControl flight on a Flybarless Heli
C: ?
D: ?

View File

@ -141,18 +141,19 @@ static void AttitudeTask(void *parameters)
FlightStatusData flightStatus;
FlightStatusGet(&flightStatus);
if(xTaskGetTickCount() < 10000) {
// For first 5 seconds use accels to get gyro bias
if(xTaskGetTickCount() < 7000) {
// Force settings update to make sure rotation loaded
settingsUpdatedCb(AttitudeSettingsHandle());
// For first 7 seconds use accels to get gyro bias
accelKp = 1;
// Decrease the rate of gyro learning during init
accelKi = .5 / (1 + xTaskGetTickCount() / 5000);
yawBiasRate = 0.01 / (1 + xTaskGetTickCount() / 5000);
accelKi = 0.9;
yawBiasRate = 0.23;
init = 0;
}
else if (zero_during_arming && (flightStatus.Armed == FLIGHTSTATUS_ARMED_ARMING)) {
accelKi = .01;
yawBiasRate = 0.1;
yawBiasRate = 0.23;
init = 0;
} else if (init == 0) {
settingsUpdatedCb(AttitudeSettingsHandle());

View File

@ -30,6 +30,7 @@
#include "openpilot.h"
#include "firmwareiap.h"
#include "firmwareiapobj.h"
#include "flightstatus.h"
// Private constants
#define IAP_CMD_STEP_1 1122
@ -156,6 +157,16 @@ static void FirmwareIAPCallback(UAVObjEvent* ev)
case IAP_STATE_STEP_2:
if( data.Command == IAP_CMD_STEP_3 ) {
if( delta > iap_time_3_low_end && delta < iap_time_3_high_end ) {
FlightStatusData flightStatus;
FlightStatusGet(&flightStatus);
if(flightStatus.Armed != FLIGHTSTATUS_ARMED_DISARMED) {
// Abort any attempts if not disarmed
iap_state = IAP_STATE_READY;
break;
}
// we've met the three sequence of command numbers
// we've met the time requirements.
PIOS_IAP_SetRequest1();

View File

@ -63,7 +63,7 @@ static float GravityAccel(float latitude, float longitude, float altitude);
// Private constants
//#define FULL_COLD_RESTART // uncomment this to tell the GPS to do a FULL COLD restart
//#define DISABLE_GPS_TRESHOLD //
//#define DISABLE_GPS_THRESHOLD //
#define GPS_TIMEOUT_MS 500
#define GPS_COMMAND_RESEND_TIMEOUT_MS 2000
@ -154,7 +154,7 @@ static void gpsTask(void *parameters)
}
#endif
#ifdef DISABLE_GPS_TRESHOLD
#ifdef DISABLE_GPS_THRESHOLD
PIOS_COM_SendStringNonBlocking(gpsPort, "$PMTK397,0*23\r\n");
#endif

View File

@ -1,5 +1,5 @@
[General]
ViewGroup_Default=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5V\0\0\x2\x9a\0\0\0\x4\0\0\0\x4\0\0\0\x1\0\0\0\b\xfc\0\0\0\0)
ViewGroup_Default=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5\xa0\0\0\x3/\0\0\0\x4\0\0\0\x4\0\0\0\x1\0\0\0\b\xfc\0\0\0\0)
[Workspace]
NumberOfWorkspaces=6
@ -70,6 +70,7 @@ Mode1\splitter\side0\side1\splitterOrientation=1
Mode1\splitter\side0\side1\splitterSizes=304, 433
Mode1\splitter\side0\side1\side0\type=uavGadget
Mode1\splitter\side0\side1\side0\classId=ModelViewGadget
Mode1\splitter\side0\side1\side0\gadget\activeConfiguration=Test Quad X
Mode1\splitter\side0\side1\side1\type=splitter
Mode1\splitter\side0\side1\side1\splitterOrientation=2
Mode1\splitter\side0\side1\side1\splitterSizes=293, 64
@ -180,7 +181,15 @@ Mode2\splitter\side0\side1\side0\gadget\activeConfiguration=Telemetry RX Rate Ho
Mode2\splitter\side0\side1\side1\type=uavGadget
Mode2\splitter\side0\side1\side1\classId=LineardialGadget
Mode2\splitter\side0\side1\side1\gadget\activeConfiguration=Telemetry TX Rate Horizontal
Mode2\splitter\side1\type=uavGadget
Mode2\splitter\side1\type=splitter
Mode2\splitter\side1\splitterOrientation=2
Mode2\splitter\side1\splitterSizes=426, 354
Mode2\splitter\side1\side0\type=uavGadget
Mode2\splitter\side1\side0\classId=UAVObjectBrowser
Mode2\splitter\side1\side0\gadget\activeConfiguration=default
Mode2\splitter\side1\side1\type=uavGadget
Mode2\splitter\side1\side1\classId=GCSControlGadget
Mode2\splitter\side1\side1\gadget\activeConfiguration=MS Sidewinder
Mode3\version=UAVGadgetManagerV1
Mode3\showToolbars=false
Mode3\splitter\type=splitter
@ -194,6 +203,7 @@ Mode3\splitter\side1\splitterOrientation=2
Mode3\splitter\side1\splitterSizes=395, 236
Mode3\splitter\side1\side0\type=uavGadget
Mode3\splitter\side1\side0\classId=ModelViewGadget
Mode3\splitter\side1\side0\gadget\activeConfiguration=Test Quad X
Mode3\splitter\side1\side1\type=splitter
Mode3\splitter\side1\side1\splitterOrientation=1
Mode3\splitter\side1\side1\splitterSizes=@Invalid()
@ -289,21 +299,13 @@ Mode6\splitter\side1\side0\side1\gadget\activeConfiguration=raw
Mode6\splitter\side1\side1\type=uavGadget
Mode6\splitter\side1\side1\classId=ScopeGadget
Mode6\splitter\side1\side1\gadget\activeConfiguration=Uptimes
Mode1\splitter\side0\side1\side0\gadget\activeConfiguration=Test Quad X
Mode2\splitter\side1\classId=UAVObjectBrowser
Mode2\splitter\side1\gadget\activeConfiguration=default
Mode3\splitter\side1\side0\gadget\activeConfiguration=Test Quad X
[KeyBindings]
size=0
[%General]
OverrideLanguage=en_AU
SaveSettingsOnExit=true
TerminalEmulator=xterm -e
LastPreferenceCategory=LineardialGadget
LastPreferencePage=Roll Desired 1
SettingsWindowWidth=921
SettingsWindowHeight=534
[UAVGadgetConfigurations]
configInfo\version=1.2.0
@ -1233,6 +1235,40 @@ LineardialGadget\Mainboard%20CPU\data\factor=1
LineardialGadget\Mainboard%20CPU\data\useOpenGLFlag=false
LineardialGadget\Mainboard%20CPU\configInfo\version=0.0.0
LineardialGadget\Mainboard%20CPU\configInfo\locked=false
LineardialGadget\Pitch\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Pitch\data\sourceDataObject=ManualControlCommand
LineardialGadget\Pitch\data\sourceObjectField=Pitch
LineardialGadget\Pitch\data\minValue=-1
LineardialGadget\Pitch\data\maxValue=1
LineardialGadget\Pitch\data\redMin=-1
LineardialGadget\Pitch\data\redMax=1
LineardialGadget\Pitch\data\yellowMin=-0.8
LineardialGadget\Pitch\data\yellowMax=0.8
LineardialGadget\Pitch\data\greenMin=-0.5
LineardialGadget\Pitch\data\greenMax=0.5
LineardialGadget\Pitch\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Pitch\data\decimalPlaces=2
LineardialGadget\Pitch\data\factor=1
LineardialGadget\Pitch\data\useOpenGLFlag=false
LineardialGadget\Pitch\configInfo\version=0.0.0
LineardialGadget\Pitch\configInfo\locked=false
LineardialGadget\Pitch%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Pitch%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Pitch%20Desired\data\sourceObjectField=Pitch
LineardialGadget\Pitch%20Desired\data\minValue=-1
LineardialGadget\Pitch%20Desired\data\maxValue=1
LineardialGadget\Pitch%20Desired\data\redMin=-1
LineardialGadget\Pitch%20Desired\data\redMax=1
LineardialGadget\Pitch%20Desired\data\yellowMin=-0.8
LineardialGadget\Pitch%20Desired\data\yellowMax=0.8
LineardialGadget\Pitch%20Desired\data\greenMin=-0.5
LineardialGadget\Pitch%20Desired\data\greenMax=0.5
LineardialGadget\Pitch%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Pitch%20Desired\data\decimalPlaces=2
LineardialGadget\Pitch%20Desired\data\factor=1
LineardialGadget\Pitch%20Desired\data\useOpenGLFlag=false
LineardialGadget\Pitch%20Desired\configInfo\version=0.0.0
LineardialGadget\Pitch%20Desired\configInfo\locked=false
LineardialGadget\PitchActual\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\PitchActual\data\sourceDataObject=AttitudeActual
LineardialGadget\PitchActual\data\sourceObjectField=Pitch
@ -1267,6 +1303,23 @@ LineardialGadget\Roll\data\factor=1
LineardialGadget\Roll\data\useOpenGLFlag=false
LineardialGadget\Roll\configInfo\version=0.0.0
LineardialGadget\Roll\configInfo\locked=false
LineardialGadget\Roll%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Roll%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Roll%20Desired\data\sourceObjectField=Roll
LineardialGadget\Roll%20Desired\data\minValue=-1
LineardialGadget\Roll%20Desired\data\maxValue=1
LineardialGadget\Roll%20Desired\data\redMin=-1
LineardialGadget\Roll%20Desired\data\redMax=1
LineardialGadget\Roll%20Desired\data\yellowMin=-0.8
LineardialGadget\Roll%20Desired\data\yellowMax=0.8
LineardialGadget\Roll%20Desired\data\greenMin=-0.5
LineardialGadget\Roll%20Desired\data\greenMax=0.5
LineardialGadget\Roll%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Roll%20Desired\data\decimalPlaces=2
LineardialGadget\Roll%20Desired\data\factor=1
LineardialGadget\Roll%20Desired\data\useOpenGLFlag=false
LineardialGadget\Roll%20Desired\configInfo\version=0.0.0
LineardialGadget\Roll%20Desired\configInfo\locked=false
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\dFile=%%DATAPATH%%dials/default/lineardial-horizontal.svg
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\sourceDataObject=GCSTelemetryStats
LineardialGadget\Telemetry%20RX%20Rate%20Horizontal\data\sourceObjectField=RxDataRate
@ -1335,6 +1388,23 @@ LineardialGadget\Yaw\data\factor=1
LineardialGadget\Yaw\data\useOpenGLFlag=false
LineardialGadget\Yaw\configInfo\version=0.0.0
LineardialGadget\Yaw\configInfo\locked=false
LineardialGadget\Yaw%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Yaw%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Yaw%20Desired\data\sourceObjectField=Yaw
LineardialGadget\Yaw%20Desired\data\minValue=-1
LineardialGadget\Yaw%20Desired\data\maxValue=1
LineardialGadget\Yaw%20Desired\data\redMin=-1
LineardialGadget\Yaw%20Desired\data\redMax=1
LineardialGadget\Yaw%20Desired\data\yellowMin=-0.8
LineardialGadget\Yaw%20Desired\data\yellowMax=0.8
LineardialGadget\Yaw%20Desired\data\greenMin=-0.5
LineardialGadget\Yaw%20Desired\data\greenMax=0.5
LineardialGadget\Yaw%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Yaw%20Desired\data\decimalPlaces=2
LineardialGadget\Yaw%20Desired\data\factor=1
LineardialGadget\Yaw%20Desired\data\useOpenGLFlag=false
LineardialGadget\Yaw%20Desired\configInfo\version=0.0.0
LineardialGadget\Yaw%20Desired\configInfo\locked=false
ModelViewGadget\Aeroquad%20%2B\data\acFilename=%%DATAPATH%%models/multi/aeroquad/aeroquad_+.3ds
ModelViewGadget\Aeroquad%20%2B\data\bgFilename=%%DATAPATH%%models/backgrounds/default_background.png
ModelViewGadget\Aeroquad%20%2B\data\enableVbo=false
@ -1404,40 +1474,6 @@ OPMapGadget\Google%20Sat\data\showTileGridLines=false
OPMapGadget\Google%20Sat\data\accessMode=ServerAndCache
OPMapGadget\Google%20Sat\data\useMemoryCache=true
OPMapGadget\Google%20Sat\data\uavSymbol=mapquad.png
LineardialGadget\Pitch\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Pitch\data\sourceDataObject=ManualControlCommand
LineardialGadget\Pitch\data\sourceObjectField=Pitch
LineardialGadget\Pitch\data\minValue=-1
LineardialGadget\Pitch\data\maxValue=1
LineardialGadget\Pitch\data\redMin=-1
LineardialGadget\Pitch\data\redMax=1
LineardialGadget\Pitch\data\yellowMin=-0.8
LineardialGadget\Pitch\data\yellowMax=0.8
LineardialGadget\Pitch\data\greenMin=-0.5
LineardialGadget\Pitch\data\greenMax=0.5
LineardialGadget\Pitch\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Pitch\data\decimalPlaces=2
LineardialGadget\Pitch\data\factor=1
LineardialGadget\Pitch\data\useOpenGLFlag=false
LineardialGadget\Pitch\configInfo\version=0.0.0
LineardialGadget\Pitch\configInfo\locked=false
LineardialGadget\Pitch%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Pitch%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Pitch%20Desired\data\sourceObjectField=Pitch
LineardialGadget\Pitch%20Desired\data\minValue=-1
LineardialGadget\Pitch%20Desired\data\maxValue=1
LineardialGadget\Pitch%20Desired\data\redMin=-1
LineardialGadget\Pitch%20Desired\data\redMax=1
LineardialGadget\Pitch%20Desired\data\yellowMin=-0.8
LineardialGadget\Pitch%20Desired\data\yellowMax=0.8
LineardialGadget\Pitch%20Desired\data\greenMin=-0.5
LineardialGadget\Pitch%20Desired\data\greenMax=0.5
LineardialGadget\Pitch%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Pitch%20Desired\data\decimalPlaces=2
LineardialGadget\Pitch%20Desired\data\factor=1
LineardialGadget\Pitch%20Desired\data\useOpenGLFlag=false
LineardialGadget\Pitch%20Desired\configInfo\version=0.0.0
LineardialGadget\Pitch%20Desired\configInfo\locked=false
OPMapGadget\Google%20Sat\data\cacheLocation=%%STOREPATH%%mapscache/
OPMapGadget\Google%20Sat\configInfo\version=0.0.0
OPMapGadget\Google%20Sat\configInfo\locked=false
@ -1875,52 +1911,18 @@ Uploader\default\data\defaultStopBits=0
Uploader\default\data\defaultPort=/dev/ttyS0
Uploader\default\configInfo\version=0.0.0
Uploader\default\configInfo\locked=false
LineardialGadget\Roll%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Roll%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Roll%20Desired\data\sourceObjectField=Roll
LineardialGadget\Roll%20Desired\data\minValue=-1
LineardialGadget\Roll%20Desired\data\maxValue=1
LineardialGadget\Roll%20Desired\data\redMin=-1
LineardialGadget\Roll%20Desired\data\redMax=1
LineardialGadget\Roll%20Desired\data\yellowMin=-0.8
LineardialGadget\Roll%20Desired\data\yellowMax=0.8
LineardialGadget\Roll%20Desired\data\greenMin=-0.5
LineardialGadget\Roll%20Desired\data\greenMax=0.5
LineardialGadget\Roll%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Roll%20Desired\data\decimalPlaces=2
LineardialGadget\Roll%20Desired\data\factor=1
LineardialGadget\Roll%20Desired\data\useOpenGLFlag=false
LineardialGadget\Roll%20Desired\configInfo\version=0.0.0
LineardialGadget\Roll%20Desired\configInfo\locked=false
LineardialGadget\Yaw%20Desired\data\dFile=%%DATAPATH%%dials/default/lineardial-vertical.svg
LineardialGadget\Yaw%20Desired\data\sourceDataObject=ActuatorDesired
LineardialGadget\Yaw%20Desired\data\sourceObjectField=Yaw
LineardialGadget\Yaw%20Desired\data\minValue=-1
LineardialGadget\Yaw%20Desired\data\maxValue=1
LineardialGadget\Yaw%20Desired\data\redMin=-1
LineardialGadget\Yaw%20Desired\data\redMax=1
LineardialGadget\Yaw%20Desired\data\yellowMin=-0.8
LineardialGadget\Yaw%20Desired\data\yellowMax=0.8
LineardialGadget\Yaw%20Desired\data\greenMin=-0.5
LineardialGadget\Yaw%20Desired\data\greenMax=0.5
LineardialGadget\Yaw%20Desired\data\font="Andale Mono,12,-1,5,75,0,0,0,0,0"
LineardialGadget\Yaw%20Desired\data\decimalPlaces=2
LineardialGadget\Yaw%20Desired\data\factor=1
LineardialGadget\Yaw%20Desired\data\useOpenGLFlag=false
LineardialGadget\Yaw%20Desired\configInfo\version=0.0.0
LineardialGadget\Yaw%20Desired\configInfo\locked=false
[Plugins]
SoundNotifyPlugin\data\Current\1\SoundCollectionPath=%%DATAPATH%%sounds
SoundNotifyPlugin\data\Current\1\CurrentLanguage=default
SoundNotifyPlugin\data\Current\1\ObjectField=Channel
SoundNotifyPlugin\data\Current\1\DataObject=ActuatorCommand
SoundNotifyPlugin\data\Current\1\Value=Equal to
SoundNotifyPlugin\data\Current\1\SoundCollectionPath=
SoundNotifyPlugin\data\Current\1\CurrentLanguage=
SoundNotifyPlugin\data\Current\1\ObjectField=
SoundNotifyPlugin\data\Current\1\DataObject=
SoundNotifyPlugin\data\Current\1\Value=
SoundNotifyPlugin\data\Current\1\ValueSpinBox=0
SoundNotifyPlugin\data\Current\1\Sound1=
SoundNotifyPlugin\data\Current\1\Sound2=
SoundNotifyPlugin\data\Current\1\Sound3=
SoundNotifyPlugin\data\Current\1\SayOrder=Never
SoundNotifyPlugin\data\Current\1\SayOrder=
SoundNotifyPlugin\data\Current\1\Repeat=
SoundNotifyPlugin\data\Current\1\ExpireTimeout=0
SoundNotifyPlugin\data\Current\size=1
@ -1928,9 +1930,3 @@ SoundNotifyPlugin\data\listNotifies\size=0
SoundNotifyPlugin\data\EnableSound=false
SoundNotifyPlugin\configInfo\version=1.0.0
SoundNotifyPlugin\configInfo\locked=false
[IPconnection]
Current\1\HostName=
Current\1\Port=1
Current\1\UseTCP=0
Current\size=1

View File

@ -4,7 +4,7 @@
<field name="AccelBias" units="lsb" type="int16" elementnames="X,Y,Z" defaultvalue="0"/>
<field name="BoardRotation" units="deg" type="int8" elementnames="Roll,Pitch,Yaw" defaultvalue="0,0,0"/>
<field name="GyroGain" units="(rad/s)/lsb" type="float" elements="1" defaultvalue="0.42"/>
<field name="AccelKp" units="channel" type="float" elements="1" defaultvalue="0.01"/>
<field name="AccelKp" units="channel" type="float" elements="1" defaultvalue="0.05"/>
<field name="AccelKi" units="channel" type="float" elements="1" defaultvalue="0.0001"/>
<field name="YawBiasRate" units="channel" type="float" elements="1" defaultvalue="0.000001"/>
<field name="ZeroDuringArming" units="channel" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>

View File

@ -7,9 +7,9 @@
<field name="ManualRate" units="degrees/sec" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="150,150,150"/>
<field name="MaximumRate" units="degrees/sec" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="300,300,300"/>
<field name="RollRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.0015,0,0.3"/>
<field name="PitchRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.0015,0,0.3"/>
<field name="YawRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.003,0,0.3"/>
<field name="RollRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.0025,0,0.3"/>
<field name="PitchRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.0025,0,0.3"/>
<field name="YawRatePI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="0.0035,0.0035,0.3"/>
<field name="RollPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2,0,50"/>
<field name="PitchPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2,0,50"/>
<field name="YawPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2,0,50"/>