1
0
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:
sambas 2010-08-22 08:59:18 +00:00 committed by sambas
parent 78868216ca
commit 7859a130e8
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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()) );

View File

@ -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"/>