mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Fixed bug that caused Object Browser to crash
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1369 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
78868216ca
commit
7859a130e8
@ -73,7 +73,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
|
||||
// Initialize object fields to their default values
|
||||
UAVObjGetInstanceData(obj, instId, &data);
|
||||
memset(&data, 0, sizeof(HomeLocationData));
|
||||
data.Set = -1;
|
||||
data.Set = 0;
|
||||
data.Latitude = 0;
|
||||
data.Longitude = 0;
|
||||
data.Altitude = 0;
|
||||
|
@ -111,7 +111,7 @@ UAVObject::Metadata HomeLocation::getDefaultMetadata()
|
||||
*/
|
||||
void HomeLocation::setDefaultFieldValues()
|
||||
{
|
||||
data.Set = -1;
|
||||
data.Set = 0;
|
||||
data.Latitude = 0;
|
||||
data.Longitude = 0;
|
||||
data.Altitude = 0;
|
||||
|
@ -47,7 +47,7 @@ NavigationSettings::NavigationSettings(): UAVDataObject(OBJID, ISSINGLEINST, ISS
|
||||
fields.append( new UAVObjectField(QString("UpdatePeriod"), QString("ms"), UAVObjectField::UINT16, UpdatePeriodElemNames, QStringList()) );
|
||||
QStringList AccelerationMaxElemNames;
|
||||
AccelerationMaxElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("AccelerationMax"), QString("m/s"), UAVObjectField::FLOAT32, AccelerationMaxElemNames, QStringList()) );
|
||||
fields.append( new UAVObjectField(QString("AccelerationMax"), QString("m/s²"), UAVObjectField::FLOAT32, AccelerationMaxElemNames, QStringList()) );
|
||||
QStringList SpeedMaxElemNames;
|
||||
SpeedMaxElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("SpeedMax"), QString("m/s"), UAVObjectField::FLOAT32, SpeedMaxElemNames, QStringList()) );
|
||||
|
@ -1,6 +1,6 @@
|
||||
<xml>
|
||||
<object name="HomeLocation" singleinstance="true" settings="true">
|
||||
<field name="Set" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="false"/>
|
||||
<field name="Set" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>
|
||||
<field name="Latitude" units="deg * 10e6" type="int32" elements="1" defaultvalue="0"/>
|
||||
<field name="Longitude" units="deg * 10e6" type="int32" elements="1" defaultvalue="0"/>
|
||||
<field name="Altitude" units="m over geoid" type="float" elements="1" defaultvalue="0"/>
|
||||
|
Loading…
Reference in New Issue
Block a user