本文整理汇总了C++中UAVObjGetInstanceData函数的典型用法代码示例。如果您正苦于以下问题:C++ UAVObjGetInstanceData函数的具体用法?C++ UAVObjGetInstanceData怎么用?C++ UAVObjGetInstanceData使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UAVObjGetInstanceData函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReceiverActivitySetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void ReceiverActivitySetDefaults(UAVObjHandle obj, uint16_t instId)
{
ReceiverActivityData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(ReceiverActivityData));
data.ActiveGroup = 7;
data.ActiveChannel = 255;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READONLY << UAVOBJ_GCS_ACCESS_SHIFT |
0 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
0 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例2: HwSparkySetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void HwSparkySetDefaults(UAVObjHandle obj, uint16_t instId)
{
HwSparkyData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(HwSparkyData));
data.RcvrPort = 0;
data.FlexiPort = 0;
data.MainPort = 0;
data.OutPort = 0;
data.USB_HIDPort = 0;
data.USB_VCPPort = 3;
data.DSMxBind = 0;
data.GyroRange = 1;
data.AccelRange = 2;
data.MPU9150DLPF = 0;
data.MPU9150Rate = 2;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例3: CameraDesiredSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void CameraDesiredSetDefaults(UAVObjHandle obj, uint16_t instId)
{
CameraDesiredData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(CameraDesiredData));
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if (instId == 0) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
0 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
0 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_PERIODIC << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 1000;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例4: HomeLocationSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void HomeLocationSetDefaults(UAVObjHandle obj, uint16_t instId)
{
HomeLocationData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(HomeLocationData));
data.Latitude = 0;
data.Longitude = 0;
data.Altitude = 0;
data.Be[0] = 0;
data.Be[1] = 0;
data.Be[2] = 0;
data.GroundTemperature = 150;
data.SeaLevelPressure = 1013;
data.Set = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例5: AirspeedSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void AirspeedSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
AirspeedSettingsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(AirspeedSettingsData));
data.Scale = 1.000000e+00f;
data.IMUBasedEstimationLowPassPeriod1 = 5.000000e-01f;
data.IMUBasedEstimationLowPassPeriod2 = 1.000000e+01f;
data.ZeroPoint = 0;
data.SamplePeriod = 100;
data.AirspeedSensorType = 5;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if ( instId == 0 ) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_LOGGING_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例6: FlightPlanSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void FlightPlanSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
FlightPlanSettingsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(FlightPlanSettingsData));
data.Test = 0.000000e+00f;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if ( instId == 0 ) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_LOGGING_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例7: SystemSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void SystemSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
SystemSettingsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(SystemSettingsData));
data.AirframeCategorySpecificConfiguration[0] = 0;
data.AirframeCategorySpecificConfiguration[1] = 0;
data.AirframeCategorySpecificConfiguration[2] = 0;
data.AirframeCategorySpecificConfiguration[3] = 0;
data.AirframeType = 5;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if (instId == 0) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例8: AirspeedSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void AirspeedSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
AirspeedSettingsData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(AirspeedSettingsData));
data.Scale = 1;
data.ZeroPoint = 0;
data.GPSSamplePeriod_ms = 100;
data.AirspeedSensorType = 3;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例9: OveroSyncSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void OveroSyncSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
OveroSyncSettingsData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(OveroSyncSettingsData));
data.LogOn = 2;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
0 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
0 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 1000;
UAVObjSetMetadata(obj, &metadata);
}
示例10: FlightPlanControlSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void FlightPlanControlSetDefaults(UAVObjHandle obj, uint16_t instId)
{
FlightPlanControlData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(FlightPlanControlData));
data.Command = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例11: setDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
static void setDefaults(UAVObjHandle obj, uint16_t instId)
{
AttitudeSettingsData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(AttitudeSettingsData));
data.PitchBias = 0;
data.RollBias = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.access = ACCESS_READWRITE;
metadata.gcsAccess = ACCESS_READWRITE;
metadata.telemetryAcked = 1;
metadata.telemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryAcked = 1;
metadata.gcsTelemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdateMode = UPDATEMODE_NEVER;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
示例12: VtolSelfTuningStatsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void VtolSelfTuningStatsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
VtolSelfTuningStatsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(VtolSelfTuningStatsData));
data.NeutralThrustOffset = 0.000000e+00f;
data.NeutralThrustCorrection = 0.000000e+00f;
data.NeutralThrustAccumulator = 0.000000e+00f;
data.NeutralThrustRange = 0.000000e+00f;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if ( instId == 0 ) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
0 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
0 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_PERIODIC << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_LOGGING_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 1000;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例13: UAVObjGetInstanceData
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void $(NAME)SetDefaults(UAVObjHandle obj, uint16_t instId)
{
$(NAME)Data data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof($(NAME)Data));
$(INITFIELDS)
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if (instId == 0) {
UAVObjMetadata metadata;
metadata.flags =
$(FLIGHTACCESS) << UAVOBJ_ACCESS_SHIFT |
$(GCSACCESS) << UAVOBJ_GCS_ACCESS_SHIFT |
$(FLIGHTTELEM_ACKED) << UAVOBJ_TELEMETRY_ACKED_SHIFT |
$(GCSTELEM_ACKED) << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
$(FLIGHTTELEM_UPDATEMODE) << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
$(GCSTELEM_UPDATEMODE) << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = $(FLIGHTTELEM_UPDATEPERIOD);
metadata.gcsTelemetryUpdatePeriod = $(GCSTELEM_UPDATEPERIOD);
metadata.loggingUpdatePeriod = $(LOGGING_UPDATEPERIOD);
UAVObjSetMetadata(obj, &metadata);
}
}
示例14: VtolPathFollowerSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void VtolPathFollowerSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
VtolPathFollowerSettingsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(VtolPathFollowerSettingsData));
data.HorizontalPosPI[0] = 1;
data.HorizontalPosPI[1] = 0;
data.HorizontalPosPI[2] = 2;
data.HorizontalVelPID[0] = 2.6;
data.HorizontalVelPID[1] = 0.4;
data.HorizontalVelPID[2] = 0;
data.HorizontalVelPID[3] = 5;
data.VelocityFeedforward = 0;
data.PositionFeedforward = 0.45;
data.EndpointDeadbandWidth = 0.45;
data.EndpointDeadbandCenterGain = 0.3;
data.PathDeadbandWidth = 1.25;
data.PathDeadbandCenterGain = 0.1;
data.MaxRollPitch = 20;
data.EndpointRadius = 2;
data.WaypointAltitudeTol = 2;
data.UpdatePeriod = 50;
data.LandingRate = 0.5;
data.LoiterBrakingTimeConstant = 1.25;
data.LoiterErrorDecayConstant = 0.15;
data.LoiterLookaheadTimeConstant = 1.25;
data.LoiterInitialMaxVel = 3.5;
data.LoiterAttitudeFeedthrough = 15;
data.ReturnToHomeVel = 3;
data.HorizontalVelMax = 10;
data.VerticalVelMax = 2;
data.ThrottleControl = 0;
data.VelocityChangePrediction = 0;
data.YawMode = 1;
data.LoiterAllowAltControl = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if (instId == 0) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}
示例15: SystemSettingsSetDefaults
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
void SystemSettingsSetDefaults(UAVObjHandle obj, uint16_t instId)
{
SystemSettingsData data;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(SystemSettingsData));
data.GUIConfigData[0] = 0;
data.GUIConfigData[1] = 0;
data.GUIConfigData[2] = 0;
data.GUIConfigData[3] = 0;
data.AirSpeedMax = 3.000000e+01f;
data.AirSpeedMin = 1.000000e+01f;
data.AirframeType = 5;
data.VehicleName[0] = 0;
data.VehicleName[1] = 0;
data.VehicleName[2] = 0;
data.VehicleName[3] = 0;
data.VehicleName[4] = 0;
data.VehicleName[5] = 0;
data.VehicleName[6] = 0;
data.VehicleName[7] = 0;
data.VehicleName[8] = 0;
data.VehicleName[9] = 0;
data.VehicleName[10] = 0;
data.VehicleName[11] = 0;
data.VehicleName[12] = 0;
data.VehicleName[13] = 0;
data.VehicleName[14] = 0;
data.VehicleName[15] = 0;
data.VehicleName[16] = 0;
data.VehicleName[17] = 0;
data.VehicleName[18] = 0;
data.VehicleName[19] = 0;
data.ThrustControl = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
if ( instId == 0 ) {
UAVObjMetadata metadata;
metadata.flags =
ACCESS_READWRITE << UAVOBJ_ACCESS_SHIFT |
ACCESS_READWRITE << UAVOBJ_GCS_ACCESS_SHIFT |
1 << UAVOBJ_TELEMETRY_ACKED_SHIFT |
1 << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_ONCHANGE << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT |
UPDATEMODE_MANUAL << UAVOBJ_LOGGING_UPDATE_MODE_SHIFT;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
}