mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Update objects and delete old UAVObjects
This commit is contained in:
parent
aa99433310
commit
e9964668be
@ -1,252 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file uavobjecttemplate.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Template for an uavobject in java
|
||||
* This is a autogenerated file!! Do not modify and expect a result.
|
||||
* Contains the calibration settings for the @ref AHRSCommsModule
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package org.openpilot.uavtalk.uavobjects;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.openpilot.uavtalk.UAVObjectManager;
|
||||
import org.openpilot.uavtalk.UAVObject;
|
||||
import org.openpilot.uavtalk.UAVDataObject;
|
||||
import org.openpilot.uavtalk.UAVObjectField;
|
||||
|
||||
/**
|
||||
Contains the calibration settings for the @ref AHRSCommsModule
|
||||
|
||||
generated from ahrscalibration.xml
|
||||
**/
|
||||
public class AHRSCalibration extends UAVDataObject {
|
||||
|
||||
public AHRSCalibration() {
|
||||
super(OBJID, ISSINGLEINST, ISSETTINGS, NAME);
|
||||
|
||||
List<UAVObjectField> fields = new ArrayList<UAVObjectField>();
|
||||
|
||||
|
||||
List<String> accel_biasElemNames = new ArrayList<String>();
|
||||
accel_biasElemNames.add("X");
|
||||
accel_biasElemNames.add("Y");
|
||||
accel_biasElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("accel_bias", "m/s", UAVObjectField.FieldType.FLOAT32, accel_biasElemNames, null) );
|
||||
|
||||
List<String> accel_scaleElemNames = new ArrayList<String>();
|
||||
accel_scaleElemNames.add("X");
|
||||
accel_scaleElemNames.add("Y");
|
||||
accel_scaleElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("accel_scale", "(m/s)/lsb", UAVObjectField.FieldType.FLOAT32, accel_scaleElemNames, null) );
|
||||
|
||||
List<String> accel_orthoElemNames = new ArrayList<String>();
|
||||
accel_orthoElemNames.add("XY");
|
||||
accel_orthoElemNames.add("XZ");
|
||||
accel_orthoElemNames.add("YZ");
|
||||
fields.add( new UAVObjectField("accel_ortho", "scale", UAVObjectField.FieldType.FLOAT32, accel_orthoElemNames, null) );
|
||||
|
||||
List<String> accel_varElemNames = new ArrayList<String>();
|
||||
accel_varElemNames.add("X");
|
||||
accel_varElemNames.add("Y");
|
||||
accel_varElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("accel_var", "(m/s)^2", UAVObjectField.FieldType.FLOAT32, accel_varElemNames, null) );
|
||||
|
||||
List<String> gyro_biasElemNames = new ArrayList<String>();
|
||||
gyro_biasElemNames.add("X");
|
||||
gyro_biasElemNames.add("Y");
|
||||
gyro_biasElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyro_bias", "rad/s", UAVObjectField.FieldType.FLOAT32, gyro_biasElemNames, null) );
|
||||
|
||||
List<String> gyro_scaleElemNames = new ArrayList<String>();
|
||||
gyro_scaleElemNames.add("X");
|
||||
gyro_scaleElemNames.add("Y");
|
||||
gyro_scaleElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyro_scale", "(rad/s)/lsb", UAVObjectField.FieldType.FLOAT32, gyro_scaleElemNames, null) );
|
||||
|
||||
List<String> gyro_varElemNames = new ArrayList<String>();
|
||||
gyro_varElemNames.add("X");
|
||||
gyro_varElemNames.add("Y");
|
||||
gyro_varElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyro_var", "(rad/s)^2", UAVObjectField.FieldType.FLOAT32, gyro_varElemNames, null) );
|
||||
|
||||
List<String> gyro_tempcompfactorElemNames = new ArrayList<String>();
|
||||
gyro_tempcompfactorElemNames.add("X");
|
||||
gyro_tempcompfactorElemNames.add("Y");
|
||||
gyro_tempcompfactorElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyro_tempcompfactor", "raw/raw", UAVObjectField.FieldType.FLOAT32, gyro_tempcompfactorElemNames, null) );
|
||||
|
||||
List<String> mag_biasElemNames = new ArrayList<String>();
|
||||
mag_biasElemNames.add("X");
|
||||
mag_biasElemNames.add("Y");
|
||||
mag_biasElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("mag_bias", "mGau", UAVObjectField.FieldType.FLOAT32, mag_biasElemNames, null) );
|
||||
|
||||
List<String> mag_scaleElemNames = new ArrayList<String>();
|
||||
mag_scaleElemNames.add("X");
|
||||
mag_scaleElemNames.add("Y");
|
||||
mag_scaleElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("mag_scale", "(mGau)/lsb", UAVObjectField.FieldType.FLOAT32, mag_scaleElemNames, null) );
|
||||
|
||||
List<String> mag_varElemNames = new ArrayList<String>();
|
||||
mag_varElemNames.add("X");
|
||||
mag_varElemNames.add("Y");
|
||||
mag_varElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("mag_var", "mGau^2", UAVObjectField.FieldType.FLOAT32, mag_varElemNames, null) );
|
||||
|
||||
List<String> vel_varElemNames = new ArrayList<String>();
|
||||
vel_varElemNames.add("0");
|
||||
fields.add( new UAVObjectField("vel_var", "(m/s)^2", UAVObjectField.FieldType.FLOAT32, vel_varElemNames, null) );
|
||||
|
||||
List<String> pos_varElemNames = new ArrayList<String>();
|
||||
pos_varElemNames.add("0");
|
||||
fields.add( new UAVObjectField("pos_var", "m^2", UAVObjectField.FieldType.FLOAT32, pos_varElemNames, null) );
|
||||
|
||||
List<String> measure_varElemNames = new ArrayList<String>();
|
||||
measure_varElemNames.add("0");
|
||||
List<String> measure_varEnumOptions = new ArrayList<String>();
|
||||
measure_varEnumOptions.add("SET");
|
||||
measure_varEnumOptions.add("MEASURE");
|
||||
fields.add( new UAVObjectField("measure_var", "", UAVObjectField.FieldType.ENUM, measure_varElemNames, measure_varEnumOptions) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
int numBytes = 0;
|
||||
ListIterator<UAVObjectField> li = fields.listIterator();
|
||||
while(li.hasNext()) {
|
||||
numBytes += li.next().getNumBytes();
|
||||
}
|
||||
NUMBYTES = numBytes;
|
||||
|
||||
// Initialize object
|
||||
initializeFields(fields, ByteBuffer.allocate(NUMBYTES), NUMBYTES);
|
||||
// Set the default field values
|
||||
setDefaultFieldValues();
|
||||
// Set the object description
|
||||
setDescription(DESCRIPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Metadata object filled with default values for this object
|
||||
* @return Metadata object with default values
|
||||
*/
|
||||
public Metadata getDefaultMetadata() {
|
||||
UAVObject.Metadata metadata = new UAVObject.Metadata();
|
||||
metadata.gcsAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = UAVObject.Acked.TRUE;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_ONCHANGE;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.flightAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.flightTelemetryAcked = UAVObject.Acked.TRUE;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_ONCHANGE;
|
||||
metadata.flightTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.loggingUpdateMode = UAVObject.UpdateMode.UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize object fields with the default values.
|
||||
* If a default value is not specified the object fields
|
||||
* will be initialized to zero.
|
||||
*/
|
||||
public void setDefaultFieldValues()
|
||||
{
|
||||
getField("accel_bias").setValue(-73.5,0);
|
||||
getField("accel_bias").setValue(-73.5,1);
|
||||
getField("accel_bias").setValue(73.5,2);
|
||||
getField("accel_scale").setValue(0.0359,0);
|
||||
getField("accel_scale").setValue(0.0359,1);
|
||||
getField("accel_scale").setValue(0.0359,2);
|
||||
getField("accel_ortho").setValue(0,0);
|
||||
getField("accel_ortho").setValue(0,1);
|
||||
getField("accel_ortho").setValue(0,2);
|
||||
getField("accel_var").setValue(0.0005,0);
|
||||
getField("accel_var").setValue(0.0005,1);
|
||||
getField("accel_var").setValue(0.0005,2);
|
||||
getField("gyro_bias").setValue(28,0);
|
||||
getField("gyro_bias").setValue(-28,1);
|
||||
getField("gyro_bias").setValue(28,2);
|
||||
getField("gyro_scale").setValue(-0.017,0);
|
||||
getField("gyro_scale").setValue(0.017,1);
|
||||
getField("gyro_scale").setValue(-0.017,2);
|
||||
getField("gyro_var").setValue(0.0001,0);
|
||||
getField("gyro_var").setValue(0.0001,1);
|
||||
getField("gyro_var").setValue(0.0001,2);
|
||||
getField("gyro_tempcompfactor").setValue(0,0);
|
||||
getField("gyro_tempcompfactor").setValue(0,1);
|
||||
getField("gyro_tempcompfactor").setValue(0,2);
|
||||
getField("mag_bias").setValue(0,0);
|
||||
getField("mag_bias").setValue(0,1);
|
||||
getField("mag_bias").setValue(0,2);
|
||||
getField("mag_scale").setValue(1,0);
|
||||
getField("mag_scale").setValue(1,1);
|
||||
getField("mag_scale").setValue(1,2);
|
||||
getField("mag_var").setValue(50,0);
|
||||
getField("mag_var").setValue(50,1);
|
||||
getField("mag_var").setValue(50,2);
|
||||
getField("vel_var").setValue(10);
|
||||
getField("pos_var").setValue(0.04);
|
||||
getField("measure_var").setValue("SET");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of this object, a new instance ID must be specified.
|
||||
* Do not use this function directly to create new instances, the
|
||||
* UAVObjectManager should be used instead.
|
||||
*/
|
||||
public UAVDataObject clone(int instID) {
|
||||
// TODO: Need to get specific instance to clone
|
||||
try {
|
||||
AHRSCalibration obj = new AHRSCalibration();
|
||||
obj.initialize(instID, this.getMetaObject());
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Static function to retrieve an instance of the object.
|
||||
*/
|
||||
public AHRSCalibration GetInstance(UAVObjectManager objMngr, int instID)
|
||||
{
|
||||
return (AHRSCalibration)(objMngr.getObject(AHRSCalibration.OBJID, instID));
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xFD0EDFC4;
|
||||
protected static final String NAME = "AHRSCalibration";
|
||||
protected static String DESCRIPTION = "Contains the calibration settings for the @ref AHRSCommsModule";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
protected static final boolean ISSETTINGS = 1 == 1;
|
||||
protected static int NUMBYTES = 0;
|
||||
|
||||
|
||||
}
|
@ -1,178 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file uavobjecttemplate.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Template for an uavobject in java
|
||||
* This is a autogenerated file!! Do not modify and expect a result.
|
||||
* Settings for the @ref AHRSCommsModule to control the algorithm and what is updated
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package org.openpilot.uavtalk.uavobjects;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.openpilot.uavtalk.UAVObjectManager;
|
||||
import org.openpilot.uavtalk.UAVObject;
|
||||
import org.openpilot.uavtalk.UAVDataObject;
|
||||
import org.openpilot.uavtalk.UAVObjectField;
|
||||
|
||||
/**
|
||||
Settings for the @ref AHRSCommsModule to control the algorithm and what is updated
|
||||
|
||||
generated from ahrssettings.xml
|
||||
**/
|
||||
public class AHRSSettings extends UAVDataObject {
|
||||
|
||||
public AHRSSettings() {
|
||||
super(OBJID, ISSINGLEINST, ISSETTINGS, NAME);
|
||||
|
||||
List<UAVObjectField> fields = new ArrayList<UAVObjectField>();
|
||||
|
||||
|
||||
List<String> YawBiasElemNames = new ArrayList<String>();
|
||||
YawBiasElemNames.add("0");
|
||||
fields.add( new UAVObjectField("YawBias", "", UAVObjectField.FieldType.FLOAT32, YawBiasElemNames, null) );
|
||||
|
||||
List<String> PitchBiasElemNames = new ArrayList<String>();
|
||||
PitchBiasElemNames.add("0");
|
||||
fields.add( new UAVObjectField("PitchBias", "", UAVObjectField.FieldType.FLOAT32, PitchBiasElemNames, null) );
|
||||
|
||||
List<String> RollBiasElemNames = new ArrayList<String>();
|
||||
RollBiasElemNames.add("0");
|
||||
fields.add( new UAVObjectField("RollBias", "", UAVObjectField.FieldType.FLOAT32, RollBiasElemNames, null) );
|
||||
|
||||
List<String> AlgorithmElemNames = new ArrayList<String>();
|
||||
AlgorithmElemNames.add("0");
|
||||
List<String> AlgorithmEnumOptions = new ArrayList<String>();
|
||||
AlgorithmEnumOptions.add("SIMPLE");
|
||||
AlgorithmEnumOptions.add("INSGPS_INDOOR_NOMAG");
|
||||
AlgorithmEnumOptions.add("INSGPS_INDOOR");
|
||||
AlgorithmEnumOptions.add("INSGPS_OUTDOOR");
|
||||
fields.add( new UAVObjectField("Algorithm", "", UAVObjectField.FieldType.ENUM, AlgorithmElemNames, AlgorithmEnumOptions) );
|
||||
|
||||
List<String> DownsamplingElemNames = new ArrayList<String>();
|
||||
DownsamplingElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Downsampling", "", UAVObjectField.FieldType.UINT8, DownsamplingElemNames, null) );
|
||||
|
||||
List<String> UpdatePeriodElemNames = new ArrayList<String>();
|
||||
UpdatePeriodElemNames.add("0");
|
||||
fields.add( new UAVObjectField("UpdatePeriod", "ms", UAVObjectField.FieldType.UINT8, UpdatePeriodElemNames, null) );
|
||||
|
||||
List<String> BiasCorrectedRawElemNames = new ArrayList<String>();
|
||||
BiasCorrectedRawElemNames.add("0");
|
||||
List<String> BiasCorrectedRawEnumOptions = new ArrayList<String>();
|
||||
BiasCorrectedRawEnumOptions.add("TRUE");
|
||||
BiasCorrectedRawEnumOptions.add("FALSE");
|
||||
fields.add( new UAVObjectField("BiasCorrectedRaw", "", UAVObjectField.FieldType.ENUM, BiasCorrectedRawElemNames, BiasCorrectedRawEnumOptions) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
int numBytes = 0;
|
||||
ListIterator<UAVObjectField> li = fields.listIterator();
|
||||
while(li.hasNext()) {
|
||||
numBytes += li.next().getNumBytes();
|
||||
}
|
||||
NUMBYTES = numBytes;
|
||||
|
||||
// Initialize object
|
||||
initializeFields(fields, ByteBuffer.allocate(NUMBYTES), NUMBYTES);
|
||||
// Set the default field values
|
||||
setDefaultFieldValues();
|
||||
// Set the object description
|
||||
setDescription(DESCRIPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Metadata object filled with default values for this object
|
||||
* @return Metadata object with default values
|
||||
*/
|
||||
public Metadata getDefaultMetadata() {
|
||||
UAVObject.Metadata metadata = new UAVObject.Metadata();
|
||||
metadata.gcsAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = UAVObject.Acked.TRUE;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_ONCHANGE;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.flightAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.flightTelemetryAcked = UAVObject.Acked.TRUE;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_ONCHANGE;
|
||||
metadata.flightTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.loggingUpdateMode = UAVObject.UpdateMode.UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize object fields with the default values.
|
||||
* If a default value is not specified the object fields
|
||||
* will be initialized to zero.
|
||||
*/
|
||||
public void setDefaultFieldValues()
|
||||
{
|
||||
getField("YawBias").setValue(0);
|
||||
getField("PitchBias").setValue(0);
|
||||
getField("RollBias").setValue(0);
|
||||
getField("Algorithm").setValue("INSGPS_INDOOR_NOMAG");
|
||||
getField("Downsampling").setValue(20);
|
||||
getField("UpdatePeriod").setValue(1);
|
||||
getField("BiasCorrectedRaw").setValue("TRUE");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of this object, a new instance ID must be specified.
|
||||
* Do not use this function directly to create new instances, the
|
||||
* UAVObjectManager should be used instead.
|
||||
*/
|
||||
public UAVDataObject clone(int instID) {
|
||||
// TODO: Need to get specific instance to clone
|
||||
try {
|
||||
AHRSSettings obj = new AHRSSettings();
|
||||
obj.initialize(instID, this.getMetaObject());
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Static function to retrieve an instance of the object.
|
||||
*/
|
||||
public AHRSSettings GetInstance(UAVObjectManager objMngr, int instID)
|
||||
{
|
||||
return (AHRSSettings)(objMngr.getObject(AHRSSettings.OBJID, instID));
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xF8591ED8;
|
||||
protected static final String NAME = "AHRSSettings";
|
||||
protected static String DESCRIPTION = "Settings for the @ref AHRSCommsModule to control the algorithm and what is updated";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
protected static final boolean ISSETTINGS = 1 == 1;
|
||||
protected static int NUMBYTES = 0;
|
||||
|
||||
|
||||
}
|
@ -1,201 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file uavobjecttemplate.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Template for an uavobject in java
|
||||
* This is a autogenerated file!! Do not modify and expect a result.
|
||||
* Status for the @ref AHRSCommsModule, including communication errors
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package org.openpilot.uavtalk.uavobjects;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.openpilot.uavtalk.UAVObjectManager;
|
||||
import org.openpilot.uavtalk.UAVObject;
|
||||
import org.openpilot.uavtalk.UAVDataObject;
|
||||
import org.openpilot.uavtalk.UAVObjectField;
|
||||
|
||||
/**
|
||||
Status for the @ref AHRSCommsModule, including communication errors
|
||||
|
||||
generated from ahrsstatus.xml
|
||||
**/
|
||||
public class AhrsStatus extends UAVDataObject {
|
||||
|
||||
public AhrsStatus() {
|
||||
super(OBJID, ISSINGLEINST, ISSETTINGS, NAME);
|
||||
|
||||
List<UAVObjectField> fields = new ArrayList<UAVObjectField>();
|
||||
|
||||
|
||||
List<String> RunningTimeElemNames = new ArrayList<String>();
|
||||
RunningTimeElemNames.add("0");
|
||||
fields.add( new UAVObjectField("RunningTime", "ms", UAVObjectField.FieldType.UINT32, RunningTimeElemNames, null) );
|
||||
|
||||
List<String> SerialNumberElemNames = new ArrayList<String>();
|
||||
SerialNumberElemNames.add("0");
|
||||
SerialNumberElemNames.add("1");
|
||||
SerialNumberElemNames.add("2");
|
||||
SerialNumberElemNames.add("3");
|
||||
SerialNumberElemNames.add("4");
|
||||
SerialNumberElemNames.add("5");
|
||||
SerialNumberElemNames.add("6");
|
||||
SerialNumberElemNames.add("7");
|
||||
fields.add( new UAVObjectField("SerialNumber", "", UAVObjectField.FieldType.UINT8, SerialNumberElemNames, null) );
|
||||
|
||||
List<String> CPULoadElemNames = new ArrayList<String>();
|
||||
CPULoadElemNames.add("0");
|
||||
fields.add( new UAVObjectField("CPULoad", "count", UAVObjectField.FieldType.UINT8, CPULoadElemNames, null) );
|
||||
|
||||
List<String> IdleTimePerCyleElemNames = new ArrayList<String>();
|
||||
IdleTimePerCyleElemNames.add("0");
|
||||
fields.add( new UAVObjectField("IdleTimePerCyle", "10x ms", UAVObjectField.FieldType.UINT8, IdleTimePerCyleElemNames, null) );
|
||||
|
||||
List<String> RunningTimePerCyleElemNames = new ArrayList<String>();
|
||||
RunningTimePerCyleElemNames.add("0");
|
||||
fields.add( new UAVObjectField("RunningTimePerCyle", "10x ms", UAVObjectField.FieldType.UINT8, RunningTimePerCyleElemNames, null) );
|
||||
|
||||
List<String> DroppedUpdatesElemNames = new ArrayList<String>();
|
||||
DroppedUpdatesElemNames.add("0");
|
||||
fields.add( new UAVObjectField("DroppedUpdates", "count", UAVObjectField.FieldType.UINT8, DroppedUpdatesElemNames, null) );
|
||||
|
||||
List<String> LinkRunningElemNames = new ArrayList<String>();
|
||||
LinkRunningElemNames.add("0");
|
||||
List<String> LinkRunningEnumOptions = new ArrayList<String>();
|
||||
LinkRunningEnumOptions.add("FALSE");
|
||||
LinkRunningEnumOptions.add("TRUE");
|
||||
fields.add( new UAVObjectField("LinkRunning", "", UAVObjectField.FieldType.ENUM, LinkRunningElemNames, LinkRunningEnumOptions) );
|
||||
|
||||
List<String> AhrsKickstartsElemNames = new ArrayList<String>();
|
||||
AhrsKickstartsElemNames.add("0");
|
||||
fields.add( new UAVObjectField("AhrsKickstarts", "count", UAVObjectField.FieldType.UINT8, AhrsKickstartsElemNames, null) );
|
||||
|
||||
List<String> AhrsCrcErrorsElemNames = new ArrayList<String>();
|
||||
AhrsCrcErrorsElemNames.add("0");
|
||||
fields.add( new UAVObjectField("AhrsCrcErrors", "count", UAVObjectField.FieldType.UINT8, AhrsCrcErrorsElemNames, null) );
|
||||
|
||||
List<String> AhrsRetriesElemNames = new ArrayList<String>();
|
||||
AhrsRetriesElemNames.add("0");
|
||||
fields.add( new UAVObjectField("AhrsRetries", "count", UAVObjectField.FieldType.UINT8, AhrsRetriesElemNames, null) );
|
||||
|
||||
List<String> AhrsInvalidPacketsElemNames = new ArrayList<String>();
|
||||
AhrsInvalidPacketsElemNames.add("0");
|
||||
fields.add( new UAVObjectField("AhrsInvalidPackets", "count", UAVObjectField.FieldType.UINT8, AhrsInvalidPacketsElemNames, null) );
|
||||
|
||||
List<String> OpCrcErrorsElemNames = new ArrayList<String>();
|
||||
OpCrcErrorsElemNames.add("0");
|
||||
fields.add( new UAVObjectField("OpCrcErrors", "count", UAVObjectField.FieldType.UINT8, OpCrcErrorsElemNames, null) );
|
||||
|
||||
List<String> OpRetriesElemNames = new ArrayList<String>();
|
||||
OpRetriesElemNames.add("0");
|
||||
fields.add( new UAVObjectField("OpRetries", "count", UAVObjectField.FieldType.UINT8, OpRetriesElemNames, null) );
|
||||
|
||||
List<String> OpInvalidPacketsElemNames = new ArrayList<String>();
|
||||
OpInvalidPacketsElemNames.add("0");
|
||||
fields.add( new UAVObjectField("OpInvalidPackets", "count", UAVObjectField.FieldType.UINT8, OpInvalidPacketsElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
int numBytes = 0;
|
||||
ListIterator<UAVObjectField> li = fields.listIterator();
|
||||
while(li.hasNext()) {
|
||||
numBytes += li.next().getNumBytes();
|
||||
}
|
||||
NUMBYTES = numBytes;
|
||||
|
||||
// Initialize object
|
||||
initializeFields(fields, ByteBuffer.allocate(NUMBYTES), NUMBYTES);
|
||||
// Set the default field values
|
||||
setDefaultFieldValues();
|
||||
// Set the object description
|
||||
setDescription(DESCRIPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Metadata object filled with default values for this object
|
||||
* @return Metadata object with default values
|
||||
*/
|
||||
public Metadata getDefaultMetadata() {
|
||||
UAVObject.Metadata metadata = new UAVObject.Metadata();
|
||||
metadata.gcsAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = UAVObject.Acked.FALSE;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.flightAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.flightTelemetryAcked = UAVObject.Acked.FALSE;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
|
||||
metadata.loggingUpdateMode = UAVObject.UpdateMode.UPDATEMODE_PERIODIC;
|
||||
metadata.loggingUpdatePeriod = 1000;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize object fields with the default values.
|
||||
* If a default value is not specified the object fields
|
||||
* will be initialized to zero.
|
||||
*/
|
||||
public void setDefaultFieldValues()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of this object, a new instance ID must be specified.
|
||||
* Do not use this function directly to create new instances, the
|
||||
* UAVObjectManager should be used instead.
|
||||
*/
|
||||
public UAVDataObject clone(int instID) {
|
||||
// TODO: Need to get specific instance to clone
|
||||
try {
|
||||
AhrsStatus obj = new AhrsStatus();
|
||||
obj.initialize(instID, this.getMetaObject());
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Static function to retrieve an instance of the object.
|
||||
*/
|
||||
public AhrsStatus GetInstance(UAVObjectManager objMngr, int instID)
|
||||
{
|
||||
return (AhrsStatus)(objMngr.getObject(AhrsStatus.OBJID, instID));
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x706D1AB8;
|
||||
protected static final String NAME = "AhrsStatus";
|
||||
protected static String DESCRIPTION = "Status for the @ref AHRSCommsModule, including communication errors";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
protected static final boolean ISSETTINGS = 0 == 1;
|
||||
protected static int NUMBYTES = 0;
|
||||
|
||||
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file uavobjecttemplate.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Template for an uavobject in java
|
||||
* This is a autogenerated file!! Do not modify and expect a result.
|
||||
* The raw attitude sensor data from @ref AHRSCommsModule. Not always updated.
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package org.openpilot.uavtalk.uavobjects;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.openpilot.uavtalk.UAVObjectManager;
|
||||
import org.openpilot.uavtalk.UAVObject;
|
||||
import org.openpilot.uavtalk.UAVDataObject;
|
||||
import org.openpilot.uavtalk.UAVObjectField;
|
||||
|
||||
/**
|
||||
The raw attitude sensor data from @ref AHRSCommsModule. Not always updated.
|
||||
|
||||
generated from attituderaw.xml
|
||||
**/
|
||||
public class AttitudeRaw extends UAVDataObject {
|
||||
|
||||
public AttitudeRaw() {
|
||||
super(OBJID, ISSINGLEINST, ISSETTINGS, NAME);
|
||||
|
||||
List<UAVObjectField> fields = new ArrayList<UAVObjectField>();
|
||||
|
||||
|
||||
List<String> gyrosElemNames = new ArrayList<String>();
|
||||
gyrosElemNames.add("X");
|
||||
gyrosElemNames.add("Y");
|
||||
gyrosElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyros", "deg/s", UAVObjectField.FieldType.FLOAT32, gyrosElemNames, null) );
|
||||
|
||||
List<String> accelsElemNames = new ArrayList<String>();
|
||||
accelsElemNames.add("X");
|
||||
accelsElemNames.add("Y");
|
||||
accelsElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("accels", "m/s^2", UAVObjectField.FieldType.FLOAT32, accelsElemNames, null) );
|
||||
|
||||
List<String> magnetometersElemNames = new ArrayList<String>();
|
||||
magnetometersElemNames.add("X");
|
||||
magnetometersElemNames.add("Y");
|
||||
magnetometersElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("magnetometers", "mGa", UAVObjectField.FieldType.INT16, magnetometersElemNames, null) );
|
||||
|
||||
List<String> gyrotempElemNames = new ArrayList<String>();
|
||||
gyrotempElemNames.add("XY");
|
||||
gyrotempElemNames.add("Z");
|
||||
fields.add( new UAVObjectField("gyrotemp", "raw", UAVObjectField.FieldType.UINT16, gyrotempElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
int numBytes = 0;
|
||||
ListIterator<UAVObjectField> li = fields.listIterator();
|
||||
while(li.hasNext()) {
|
||||
numBytes += li.next().getNumBytes();
|
||||
}
|
||||
NUMBYTES = numBytes;
|
||||
|
||||
// Initialize object
|
||||
initializeFields(fields, ByteBuffer.allocate(NUMBYTES), NUMBYTES);
|
||||
// Set the default field values
|
||||
setDefaultFieldValues();
|
||||
// Set the object description
|
||||
setDescription(DESCRIPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Metadata object filled with default values for this object
|
||||
* @return Metadata object with default values
|
||||
*/
|
||||
public Metadata getDefaultMetadata() {
|
||||
UAVObject.Metadata metadata = new UAVObject.Metadata();
|
||||
metadata.gcsAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = UAVObject.Acked.FALSE;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
|
||||
metadata.flightAccess = UAVObject.AccessMode.ACCESS_READWRITE;
|
||||
metadata.flightTelemetryAcked = UAVObject.Acked.FALSE;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject.UpdateMode.UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
|
||||
metadata.loggingUpdateMode = UAVObject.UpdateMode.UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize object fields with the default values.
|
||||
* If a default value is not specified the object fields
|
||||
* will be initialized to zero.
|
||||
*/
|
||||
public void setDefaultFieldValues()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of this object, a new instance ID must be specified.
|
||||
* Do not use this function directly to create new instances, the
|
||||
* UAVObjectManager should be used instead.
|
||||
*/
|
||||
public UAVDataObject clone(int instID) {
|
||||
// TODO: Need to get specific instance to clone
|
||||
try {
|
||||
AttitudeRaw obj = new AttitudeRaw();
|
||||
obj.initialize(instID, this.getMetaObject());
|
||||
return obj;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Static function to retrieve an instance of the object.
|
||||
*/
|
||||
public AttitudeRaw GetInstance(UAVObjectManager objMngr, int instID)
|
||||
{
|
||||
return (AttitudeRaw)(objMngr.getObject(AttitudeRaw.OBJID, instID));
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xDB722974;
|
||||
protected static final String NAME = "AttitudeRaw";
|
||||
protected static String DESCRIPTION = "The raw attitude sensor data from @ref AHRSCommsModule. Not always updated.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
protected static final boolean ISSETTINGS = 0 == 1;
|
||||
protected static int NUMBYTES = 0;
|
||||
|
||||
|
||||
}
|
@ -66,8 +66,10 @@ public class FlightStatus extends UAVDataObject {
|
||||
FlightModeEnumOptions.add("Stabilized1");
|
||||
FlightModeEnumOptions.add("Stabilized2");
|
||||
FlightModeEnumOptions.add("Stabilized3");
|
||||
FlightModeEnumOptions.add("AltitudeHold");
|
||||
FlightModeEnumOptions.add("VelocityControl");
|
||||
FlightModeEnumOptions.add("PositionHold");
|
||||
FlightModeEnumOptions.add("PathPlanner");
|
||||
fields.add( new UAVObjectField("FlightMode", "", UAVObjectField.FieldType.ENUM, FlightModeElemNames, FlightModeEnumOptions) );
|
||||
|
||||
|
||||
@ -144,7 +146,7 @@ public class FlightStatus extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x743DB13C;
|
||||
protected static final int OBJID = 0x19B92D8;
|
||||
protected static final String NAME = "FlightStatus";
|
||||
protected static String DESCRIPTION = "Contains major flight status information for other modules.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -55,14 +55,14 @@ public class GuidanceSettings extends UAVDataObject {
|
||||
HorizontalPosPIElemNames.add("Kp");
|
||||
HorizontalPosPIElemNames.add("Ki");
|
||||
HorizontalPosPIElemNames.add("ILimit");
|
||||
fields.add( new UAVObjectField("HorizontalPosPI", "(cm/s)/cm", UAVObjectField.FieldType.FLOAT32, HorizontalPosPIElemNames, null) );
|
||||
fields.add( new UAVObjectField("HorizontalPosPI", "(m/s)/m", UAVObjectField.FieldType.FLOAT32, HorizontalPosPIElemNames, null) );
|
||||
|
||||
List<String> HorizontalVelPIDElemNames = new ArrayList<String>();
|
||||
HorizontalVelPIDElemNames.add("Kp");
|
||||
HorizontalVelPIDElemNames.add("Ki");
|
||||
HorizontalVelPIDElemNames.add("Kd");
|
||||
HorizontalVelPIDElemNames.add("ILimit");
|
||||
fields.add( new UAVObjectField("HorizontalVelPID", "deg/(cm/s)", UAVObjectField.FieldType.FLOAT32, HorizontalVelPIDElemNames, null) );
|
||||
fields.add( new UAVObjectField("HorizontalVelPID", "deg/(m/s)", UAVObjectField.FieldType.FLOAT32, HorizontalVelPIDElemNames, null) );
|
||||
|
||||
List<String> VerticalPosPIElemNames = new ArrayList<String>();
|
||||
VerticalPosPIElemNames.add("Kp");
|
||||
@ -87,11 +87,11 @@ public class GuidanceSettings extends UAVDataObject {
|
||||
|
||||
List<String> HorizontalVelMaxElemNames = new ArrayList<String>();
|
||||
HorizontalVelMaxElemNames.add("0");
|
||||
fields.add( new UAVObjectField("HorizontalVelMax", "cm/s", UAVObjectField.FieldType.UINT16, HorizontalVelMaxElemNames, null) );
|
||||
fields.add( new UAVObjectField("HorizontalVelMax", "m/s", UAVObjectField.FieldType.UINT16, HorizontalVelMaxElemNames, null) );
|
||||
|
||||
List<String> VerticalVelMaxElemNames = new ArrayList<String>();
|
||||
VerticalVelMaxElemNames.add("0");
|
||||
fields.add( new UAVObjectField("VerticalVelMax", "cm/s", UAVObjectField.FieldType.UINT16, VerticalVelMaxElemNames, null) );
|
||||
fields.add( new UAVObjectField("VerticalVelMax", "m/s", UAVObjectField.FieldType.UINT16, VerticalVelMaxElemNames, null) );
|
||||
|
||||
List<String> GuidanceModeElemNames = new ArrayList<String>();
|
||||
GuidanceModeElemNames.add("0");
|
||||
|
@ -63,24 +63,6 @@ public class HomeLocation extends UAVDataObject {
|
||||
AltitudeElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Altitude", "m over geoid", UAVObjectField.FieldType.FLOAT32, AltitudeElemNames, null) );
|
||||
|
||||
List<String> ECEFElemNames = new ArrayList<String>();
|
||||
ECEFElemNames.add("0");
|
||||
ECEFElemNames.add("1");
|
||||
ECEFElemNames.add("2");
|
||||
fields.add( new UAVObjectField("ECEF", "cm", UAVObjectField.FieldType.INT32, ECEFElemNames, null) );
|
||||
|
||||
List<String> RNEElemNames = new ArrayList<String>();
|
||||
RNEElemNames.add("0");
|
||||
RNEElemNames.add("1");
|
||||
RNEElemNames.add("2");
|
||||
RNEElemNames.add("3");
|
||||
RNEElemNames.add("4");
|
||||
RNEElemNames.add("5");
|
||||
RNEElemNames.add("6");
|
||||
RNEElemNames.add("7");
|
||||
RNEElemNames.add("8");
|
||||
fields.add( new UAVObjectField("RNE", "", UAVObjectField.FieldType.FLOAT32, RNEElemNames, null) );
|
||||
|
||||
List<String> BeElemNames = new ArrayList<String>();
|
||||
BeElemNames.add("0");
|
||||
BeElemNames.add("1");
|
||||
@ -146,18 +128,6 @@ public class HomeLocation extends UAVDataObject {
|
||||
getField("Latitude").setValue(0);
|
||||
getField("Longitude").setValue(0);
|
||||
getField("Altitude").setValue(0);
|
||||
getField("ECEF").setValue(0,0);
|
||||
getField("ECEF").setValue(0,1);
|
||||
getField("ECEF").setValue(0,2);
|
||||
getField("RNE").setValue(0,0);
|
||||
getField("RNE").setValue(0,1);
|
||||
getField("RNE").setValue(0,2);
|
||||
getField("RNE").setValue(0,3);
|
||||
getField("RNE").setValue(0,4);
|
||||
getField("RNE").setValue(0,5);
|
||||
getField("RNE").setValue(0,6);
|
||||
getField("RNE").setValue(0,7);
|
||||
getField("RNE").setValue(0,8);
|
||||
getField("Be").setValue(0,0);
|
||||
getField("Be").setValue(0,1);
|
||||
getField("Be").setValue(0,2);
|
||||
@ -191,7 +161,7 @@ public class HomeLocation extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x5BB3AEFC;
|
||||
protected static final int OBJID = 0x6185DC6E;
|
||||
protected static final String NAME = "HomeLocation";
|
||||
protected static String DESCRIPTION = "HomeLocation setting which contains the constants to tranlate from longitutde and latitude to NED reference frame. Automatically set by @ref GPSModule after acquiring a 3D lock. Used by @ref AHRSCommsModule.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -89,31 +89,70 @@ public class HwSettings extends UAVDataObject {
|
||||
CC_FlexiPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("CC_FlexiPort", "function", UAVObjectField.FieldType.ENUM, CC_FlexiPortElemNames, CC_FlexiPortEnumOptions) );
|
||||
|
||||
List<String> OP_RcvrPortElemNames = new ArrayList<String>();
|
||||
OP_RcvrPortElemNames.add("0");
|
||||
List<String> OP_RcvrPortEnumOptions = new ArrayList<String>();
|
||||
OP_RcvrPortEnumOptions.add("Disabled");
|
||||
OP_RcvrPortEnumOptions.add("PWM");
|
||||
OP_RcvrPortEnumOptions.add("PPM");
|
||||
OP_RcvrPortEnumOptions.add("DSM2");
|
||||
OP_RcvrPortEnumOptions.add("DSMX (10bit)");
|
||||
OP_RcvrPortEnumOptions.add("DSMX (11bit)");
|
||||
OP_RcvrPortEnumOptions.add("Debug");
|
||||
fields.add( new UAVObjectField("OP_RcvrPort", "function", UAVObjectField.FieldType.ENUM, OP_RcvrPortElemNames, OP_RcvrPortEnumOptions) );
|
||||
List<String> RV_RcvrPortElemNames = new ArrayList<String>();
|
||||
RV_RcvrPortElemNames.add("0");
|
||||
List<String> RV_RcvrPortEnumOptions = new ArrayList<String>();
|
||||
RV_RcvrPortEnumOptions.add("Disabled");
|
||||
RV_RcvrPortEnumOptions.add("PWM");
|
||||
RV_RcvrPortEnumOptions.add("PPM");
|
||||
RV_RcvrPortEnumOptions.add("PPM+Outputs");
|
||||
RV_RcvrPortEnumOptions.add("Outputs");
|
||||
fields.add( new UAVObjectField("RV_RcvrPort", "function", UAVObjectField.FieldType.ENUM, RV_RcvrPortElemNames, RV_RcvrPortEnumOptions) );
|
||||
|
||||
List<String> OP_MainPortElemNames = new ArrayList<String>();
|
||||
OP_MainPortElemNames.add("0");
|
||||
List<String> OP_MainPortEnumOptions = new ArrayList<String>();
|
||||
OP_MainPortEnumOptions.add("Disabled");
|
||||
OP_MainPortEnumOptions.add("Telemetry");
|
||||
fields.add( new UAVObjectField("OP_MainPort", "function", UAVObjectField.FieldType.ENUM, OP_MainPortElemNames, OP_MainPortEnumOptions) );
|
||||
List<String> RV_AuxPortElemNames = new ArrayList<String>();
|
||||
RV_AuxPortElemNames.add("0");
|
||||
List<String> RV_AuxPortEnumOptions = new ArrayList<String>();
|
||||
RV_AuxPortEnumOptions.add("Disabled");
|
||||
RV_AuxPortEnumOptions.add("Telemetry");
|
||||
RV_AuxPortEnumOptions.add("DSM2");
|
||||
RV_AuxPortEnumOptions.add("DSMX (10bit)");
|
||||
RV_AuxPortEnumOptions.add("DSMX (11bit)");
|
||||
RV_AuxPortEnumOptions.add("ComAux");
|
||||
RV_AuxPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("RV_AuxPort", "function", UAVObjectField.FieldType.ENUM, RV_AuxPortElemNames, RV_AuxPortEnumOptions) );
|
||||
|
||||
List<String> OP_FlexiPortElemNames = new ArrayList<String>();
|
||||
OP_FlexiPortElemNames.add("0");
|
||||
List<String> OP_FlexiPortEnumOptions = new ArrayList<String>();
|
||||
OP_FlexiPortEnumOptions.add("Disabled");
|
||||
OP_FlexiPortEnumOptions.add("GPS");
|
||||
fields.add( new UAVObjectField("OP_FlexiPort", "function", UAVObjectField.FieldType.ENUM, OP_FlexiPortElemNames, OP_FlexiPortEnumOptions) );
|
||||
List<String> RV_AuxSBusPortElemNames = new ArrayList<String>();
|
||||
RV_AuxSBusPortElemNames.add("0");
|
||||
List<String> RV_AuxSBusPortEnumOptions = new ArrayList<String>();
|
||||
RV_AuxSBusPortEnumOptions.add("Disabled");
|
||||
RV_AuxSBusPortEnumOptions.add("S.Bus");
|
||||
RV_AuxSBusPortEnumOptions.add("DSM2");
|
||||
RV_AuxSBusPortEnumOptions.add("DSMX (10bit)");
|
||||
RV_AuxSBusPortEnumOptions.add("DSMX (11bit)");
|
||||
RV_AuxSBusPortEnumOptions.add("ComAux");
|
||||
RV_AuxSBusPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("RV_AuxSBusPort", "function", UAVObjectField.FieldType.ENUM, RV_AuxSBusPortElemNames, RV_AuxSBusPortEnumOptions) );
|
||||
|
||||
List<String> RV_FlexiPortElemNames = new ArrayList<String>();
|
||||
RV_FlexiPortElemNames.add("0");
|
||||
List<String> RV_FlexiPortEnumOptions = new ArrayList<String>();
|
||||
RV_FlexiPortEnumOptions.add("Disabled");
|
||||
RV_FlexiPortEnumOptions.add("I2C");
|
||||
RV_FlexiPortEnumOptions.add("DSM2");
|
||||
RV_FlexiPortEnumOptions.add("DSMX (10bit)");
|
||||
RV_FlexiPortEnumOptions.add("DSMX (11bit)");
|
||||
RV_FlexiPortEnumOptions.add("ComAux");
|
||||
RV_FlexiPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("RV_FlexiPort", "function", UAVObjectField.FieldType.ENUM, RV_FlexiPortElemNames, RV_FlexiPortEnumOptions) );
|
||||
|
||||
List<String> RV_TelemetryPortElemNames = new ArrayList<String>();
|
||||
RV_TelemetryPortElemNames.add("0");
|
||||
List<String> RV_TelemetryPortEnumOptions = new ArrayList<String>();
|
||||
RV_TelemetryPortEnumOptions.add("Disabled");
|
||||
RV_TelemetryPortEnumOptions.add("Telemetry");
|
||||
RV_TelemetryPortEnumOptions.add("ComAux");
|
||||
RV_TelemetryPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("RV_TelemetryPort", "function", UAVObjectField.FieldType.ENUM, RV_TelemetryPortElemNames, RV_TelemetryPortEnumOptions) );
|
||||
|
||||
List<String> RV_GPSPortElemNames = new ArrayList<String>();
|
||||
RV_GPSPortElemNames.add("0");
|
||||
List<String> RV_GPSPortEnumOptions = new ArrayList<String>();
|
||||
RV_GPSPortEnumOptions.add("Disabled");
|
||||
RV_GPSPortEnumOptions.add("Telemetry");
|
||||
RV_GPSPortEnumOptions.add("GPS");
|
||||
RV_GPSPortEnumOptions.add("ComAux");
|
||||
RV_GPSPortEnumOptions.add("ComBridge");
|
||||
fields.add( new UAVObjectField("RV_GPSPort", "function", UAVObjectField.FieldType.ENUM, RV_GPSPortElemNames, RV_GPSPortEnumOptions) );
|
||||
|
||||
List<String> TelemetrySpeedElemNames = new ArrayList<String>();
|
||||
TelemetrySpeedElemNames.add("0");
|
||||
@ -180,6 +219,7 @@ public class HwSettings extends UAVDataObject {
|
||||
OptionalModulesElemNames.add("ComUsbBridge");
|
||||
OptionalModulesElemNames.add("Fault");
|
||||
OptionalModulesElemNames.add("Altitude");
|
||||
OptionalModulesElemNames.add("TxPID");
|
||||
List<String> OptionalModulesEnumOptions = new ArrayList<String>();
|
||||
OptionalModulesEnumOptions.add("Disabled");
|
||||
OptionalModulesEnumOptions.add("Enabled");
|
||||
@ -237,9 +277,12 @@ public class HwSettings extends UAVDataObject {
|
||||
getField("CC_RcvrPort").setValue("PWM");
|
||||
getField("CC_MainPort").setValue("Disabled");
|
||||
getField("CC_FlexiPort").setValue("Disabled");
|
||||
getField("OP_RcvrPort").setValue("PWM");
|
||||
getField("OP_MainPort").setValue("Telemetry");
|
||||
getField("OP_FlexiPort").setValue("GPS");
|
||||
getField("RV_RcvrPort").setValue("PWM");
|
||||
getField("RV_AuxPort").setValue("Disabled");
|
||||
getField("RV_AuxSBusPort").setValue("Disabled");
|
||||
getField("RV_FlexiPort").setValue("Disabled");
|
||||
getField("RV_TelemetryPort").setValue("Telemetry");
|
||||
getField("RV_GPSPort").setValue("GPS");
|
||||
getField("TelemetrySpeed").setValue("57600");
|
||||
getField("GPSSpeed").setValue("57600");
|
||||
getField("ComUsbBridgeSpeed").setValue("57600");
|
||||
@ -251,6 +294,7 @@ public class HwSettings extends UAVDataObject {
|
||||
getField("OptionalModules").setValue("Disabled",2);
|
||||
getField("OptionalModules").setValue("Disabled",3);
|
||||
getField("OptionalModules").setValue("Disabled",4);
|
||||
getField("OptionalModules").setValue("Disabled",5);
|
||||
getField("DSMxBind").setValue(0);
|
||||
|
||||
}
|
||||
@ -280,7 +324,7 @@ public class HwSettings extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x2EE6575A;
|
||||
protected static final int OBJID = 0x4730375C;
|
||||
protected static final String NAME = "HwSettings";
|
||||
protected static String DESCRIPTION = "Selection of optional hardware configurations.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -181,8 +181,10 @@ public class ManualControlSettings extends UAVDataObject {
|
||||
FlightModePositionEnumOptions.add("Stabilized1");
|
||||
FlightModePositionEnumOptions.add("Stabilized2");
|
||||
FlightModePositionEnumOptions.add("Stabilized3");
|
||||
FlightModePositionEnumOptions.add("AltitudeHold");
|
||||
FlightModePositionEnumOptions.add("VelocityControl");
|
||||
FlightModePositionEnumOptions.add("PositionHold");
|
||||
FlightModePositionEnumOptions.add("PathPlanner");
|
||||
fields.add( new UAVObjectField("FlightModePosition", "", UAVObjectField.FieldType.ENUM, FlightModePositionElemNames, FlightModePositionEnumOptions) );
|
||||
|
||||
|
||||
@ -317,7 +319,7 @@ public class ManualControlSettings extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x24959BB0;
|
||||
protected static final int OBJID = 0x59C4551C;
|
||||
protected static final String NAME = "ManualControlSettings";
|
||||
protected static String DESCRIPTION = "Settings to indicate how to decode receiver input by @ref ManualControlModule.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -83,6 +83,14 @@ public class MixerStatus extends UAVDataObject {
|
||||
Mixer8ElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Mixer8", "", UAVObjectField.FieldType.FLOAT32, Mixer8ElemNames, null) );
|
||||
|
||||
List<String> Mixer9ElemNames = new ArrayList<String>();
|
||||
Mixer9ElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Mixer9", "", UAVObjectField.FieldType.FLOAT32, Mixer9ElemNames, null) );
|
||||
|
||||
List<String> Mixer10ElemNames = new ArrayList<String>();
|
||||
Mixer10ElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Mixer10", "", UAVObjectField.FieldType.FLOAT32, Mixer10ElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
int numBytes = 0;
|
||||
@ -156,7 +164,7 @@ public class MixerStatus extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x11CFB4E6;
|
||||
protected static final int OBJID = 0x124E28A;
|
||||
protected static final String NAME = "MixerStatus";
|
||||
protected static String DESCRIPTION = "Status for the matrix mixer showing the output of each mixer after all scaling";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -53,15 +53,15 @@ public class NedAccel extends UAVDataObject {
|
||||
|
||||
List<String> NorthElemNames = new ArrayList<String>();
|
||||
NorthElemNames.add("0");
|
||||
fields.add( new UAVObjectField("North", "cm/s^2", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
fields.add( new UAVObjectField("North", "m/s^2", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
|
||||
List<String> EastElemNames = new ArrayList<String>();
|
||||
EastElemNames.add("0");
|
||||
fields.add( new UAVObjectField("East", "cm/s^2", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
fields.add( new UAVObjectField("East", "m/s^2", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
|
||||
List<String> DownElemNames = new ArrayList<String>();
|
||||
DownElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Down", "cm/s^2", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
fields.add( new UAVObjectField("Down", "m/s^2", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
|
@ -53,15 +53,15 @@ public class PositionActual extends UAVDataObject {
|
||||
|
||||
List<String> NorthElemNames = new ArrayList<String>();
|
||||
NorthElemNames.add("0");
|
||||
fields.add( new UAVObjectField("North", "cm", UAVObjectField.FieldType.INT32, NorthElemNames, null) );
|
||||
fields.add( new UAVObjectField("North", "m", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
|
||||
List<String> EastElemNames = new ArrayList<String>();
|
||||
EastElemNames.add("0");
|
||||
fields.add( new UAVObjectField("East", "cm", UAVObjectField.FieldType.INT32, EastElemNames, null) );
|
||||
fields.add( new UAVObjectField("East", "m", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
|
||||
List<String> DownElemNames = new ArrayList<String>();
|
||||
DownElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Down", "cm", UAVObjectField.FieldType.INT32, DownElemNames, null) );
|
||||
fields.add( new UAVObjectField("Down", "m", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
@ -136,7 +136,7 @@ public class PositionActual extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xF9691DA4;
|
||||
protected static final int OBJID = 0xFA9E2D42;
|
||||
protected static final String NAME = "PositionActual";
|
||||
protected static String DESCRIPTION = "Contains the current position relative to @ref HomeLocation";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -53,15 +53,15 @@ public class PositionDesired extends UAVDataObject {
|
||||
|
||||
List<String> NorthElemNames = new ArrayList<String>();
|
||||
NorthElemNames.add("0");
|
||||
fields.add( new UAVObjectField("North", "cm", UAVObjectField.FieldType.INT32, NorthElemNames, null) );
|
||||
fields.add( new UAVObjectField("North", "m", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
|
||||
List<String> EastElemNames = new ArrayList<String>();
|
||||
EastElemNames.add("0");
|
||||
fields.add( new UAVObjectField("East", "cm", UAVObjectField.FieldType.INT32, EastElemNames, null) );
|
||||
fields.add( new UAVObjectField("East", "m", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
|
||||
List<String> DownElemNames = new ArrayList<String>();
|
||||
DownElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Down", "cm", UAVObjectField.FieldType.INT32, DownElemNames, null) );
|
||||
fields.add( new UAVObjectField("Down", "m", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
@ -136,7 +136,7 @@ public class PositionDesired extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x33C9EAB4;
|
||||
protected static final int OBJID = 0x778DBE24;
|
||||
protected static final String NAME = "PositionDesired";
|
||||
protected static String DESCRIPTION = "The position the craft is trying t achieve. Can come from GCS or @ref PathPlanner ";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -61,6 +61,7 @@ public class SystemAlarms extends UAVDataObject {
|
||||
AlarmElemNames.add("ManualControl");
|
||||
AlarmElemNames.add("Actuator");
|
||||
AlarmElemNames.add("Attitude");
|
||||
AlarmElemNames.add("Sensors");
|
||||
AlarmElemNames.add("Stabilization");
|
||||
AlarmElemNames.add("Guidance");
|
||||
AlarmElemNames.add("AHRSComms");
|
||||
@ -139,6 +140,7 @@ public class SystemAlarms extends UAVDataObject {
|
||||
getField("Alarm").setValue("Uninitialised",14);
|
||||
getField("Alarm").setValue("Uninitialised",15);
|
||||
getField("Alarm").setValue("Uninitialised",16);
|
||||
getField("Alarm").setValue("Uninitialised",17);
|
||||
|
||||
}
|
||||
|
||||
@ -167,7 +169,7 @@ public class SystemAlarms extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x737ADCF2;
|
||||
protected static final int OBJID = 0x9C7CBFE;
|
||||
protected static final String NAME = "SystemAlarms";
|
||||
protected static String DESCRIPTION = "Alarms from OpenPilot to indicate failure conditions or warnings. Set by various modules.";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -55,6 +55,18 @@ public class SystemStats extends UAVDataObject {
|
||||
FlightTimeElemNames.add("0");
|
||||
fields.add( new UAVObjectField("FlightTime", "ms", UAVObjectField.FieldType.UINT32, FlightTimeElemNames, null) );
|
||||
|
||||
List<String> EventSystemWarningIDElemNames = new ArrayList<String>();
|
||||
EventSystemWarningIDElemNames.add("0");
|
||||
fields.add( new UAVObjectField("EventSystemWarningID", "uavoid", UAVObjectField.FieldType.UINT32, EventSystemWarningIDElemNames, null) );
|
||||
|
||||
List<String> ObjectManagerCallbackIDElemNames = new ArrayList<String>();
|
||||
ObjectManagerCallbackIDElemNames.add("0");
|
||||
fields.add( new UAVObjectField("ObjectManagerCallbackID", "uavoid", UAVObjectField.FieldType.UINT32, ObjectManagerCallbackIDElemNames, null) );
|
||||
|
||||
List<String> ObjectManagerQueueIDElemNames = new ArrayList<String>();
|
||||
ObjectManagerQueueIDElemNames.add("0");
|
||||
fields.add( new UAVObjectField("ObjectManagerQueueID", "uavoid", UAVObjectField.FieldType.UINT32, ObjectManagerQueueIDElemNames, null) );
|
||||
|
||||
List<String> HeapRemainingElemNames = new ArrayList<String>();
|
||||
HeapRemainingElemNames.add("0");
|
||||
fields.add( new UAVObjectField("HeapRemaining", "bytes", UAVObjectField.FieldType.UINT16, HeapRemainingElemNames, null) );
|
||||
@ -144,7 +156,7 @@ public class SystemStats extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xD610A0F0;
|
||||
protected static final int OBJID = 0x364D1406;
|
||||
protected static final String NAME = "SystemStats";
|
||||
protected static String DESCRIPTION = "CPU and memory usage from OpenPilot computer. ";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -55,36 +55,42 @@ public class TaskInfo extends UAVDataObject {
|
||||
StackRemainingElemNames.add("System");
|
||||
StackRemainingElemNames.add("Actuator");
|
||||
StackRemainingElemNames.add("Attitude");
|
||||
StackRemainingElemNames.add("Sensors");
|
||||
StackRemainingElemNames.add("TelemetryTx");
|
||||
StackRemainingElemNames.add("TelemetryTxPri");
|
||||
StackRemainingElemNames.add("TelemetryRx");
|
||||
StackRemainingElemNames.add("GPS");
|
||||
StackRemainingElemNames.add("ManualControl");
|
||||
StackRemainingElemNames.add("Altitude");
|
||||
StackRemainingElemNames.add("AHRSComms");
|
||||
StackRemainingElemNames.add("Stabilization");
|
||||
StackRemainingElemNames.add("AltitudeHold");
|
||||
StackRemainingElemNames.add("Guidance");
|
||||
StackRemainingElemNames.add("FlightPlan");
|
||||
StackRemainingElemNames.add("PathPlanner");
|
||||
StackRemainingElemNames.add("Com2UsbBridge");
|
||||
StackRemainingElemNames.add("Usb2ComBridge");
|
||||
StackRemainingElemNames.add("OveroSync");
|
||||
fields.add( new UAVObjectField("StackRemaining", "bytes", UAVObjectField.FieldType.UINT16, StackRemainingElemNames, null) );
|
||||
|
||||
List<String> RunningElemNames = new ArrayList<String>();
|
||||
RunningElemNames.add("System");
|
||||
RunningElemNames.add("Actuator");
|
||||
RunningElemNames.add("Attitude");
|
||||
RunningElemNames.add("Sensors");
|
||||
RunningElemNames.add("TelemetryTx");
|
||||
RunningElemNames.add("TelemetryTxPri");
|
||||
RunningElemNames.add("TelemetryRx");
|
||||
RunningElemNames.add("GPS");
|
||||
RunningElemNames.add("ManualControl");
|
||||
RunningElemNames.add("Altitude");
|
||||
RunningElemNames.add("AHRSComms");
|
||||
RunningElemNames.add("Stabilization");
|
||||
RunningElemNames.add("AltitudeHold");
|
||||
RunningElemNames.add("Guidance");
|
||||
RunningElemNames.add("FlightPlan");
|
||||
RunningElemNames.add("PathPlanner");
|
||||
RunningElemNames.add("Com2UsbBridge");
|
||||
RunningElemNames.add("Usb2ComBridge");
|
||||
RunningElemNames.add("OveroSync");
|
||||
List<String> RunningEnumOptions = new ArrayList<String>();
|
||||
RunningEnumOptions.add("False");
|
||||
RunningEnumOptions.add("True");
|
||||
@ -94,18 +100,21 @@ public class TaskInfo extends UAVDataObject {
|
||||
RunningTimeElemNames.add("System");
|
||||
RunningTimeElemNames.add("Actuator");
|
||||
RunningTimeElemNames.add("Attitude");
|
||||
RunningTimeElemNames.add("Sensors");
|
||||
RunningTimeElemNames.add("TelemetryTx");
|
||||
RunningTimeElemNames.add("TelemetryTxPri");
|
||||
RunningTimeElemNames.add("TelemetryRx");
|
||||
RunningTimeElemNames.add("GPS");
|
||||
RunningTimeElemNames.add("ManualControl");
|
||||
RunningTimeElemNames.add("Altitude");
|
||||
RunningTimeElemNames.add("AHRSComms");
|
||||
RunningTimeElemNames.add("Stabilization");
|
||||
RunningTimeElemNames.add("AltitudeHold");
|
||||
RunningTimeElemNames.add("Guidance");
|
||||
RunningTimeElemNames.add("FlightPlan");
|
||||
RunningTimeElemNames.add("PathPlanner");
|
||||
RunningTimeElemNames.add("Com2UsbBridge");
|
||||
RunningTimeElemNames.add("Usb2ComBridge");
|
||||
RunningTimeElemNames.add("OveroSync");
|
||||
fields.add( new UAVObjectField("RunningTime", "%", UAVObjectField.FieldType.UINT8, RunningTimeElemNames, null) );
|
||||
|
||||
|
||||
@ -181,7 +190,7 @@ public class TaskInfo extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0xE34A7C32;
|
||||
protected static final int OBJID = 0x498F54BA;
|
||||
protected static final String NAME = "TaskInfo";
|
||||
protected static String DESCRIPTION = "Task information";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -35,15 +35,15 @@ public class UAVObjectsInitialize {
|
||||
|
||||
public static void register(UAVObjectManager objMngr) {
|
||||
try {
|
||||
objMngr.registerObject( new Accels() );
|
||||
objMngr.registerObject( new AccessoryDesired() );
|
||||
objMngr.registerObject( new ActuatorCommand() );
|
||||
objMngr.registerObject( new ActuatorDesired() );
|
||||
objMngr.registerObject( new ActuatorSettings() );
|
||||
objMngr.registerObject( new AHRSCalibration() );
|
||||
objMngr.registerObject( new AHRSSettings() );
|
||||
objMngr.registerObject( new AhrsStatus() );
|
||||
objMngr.registerObject( new AltHoldSmoothed() );
|
||||
objMngr.registerObject( new AltitudeHoldDesired() );
|
||||
objMngr.registerObject( new AltitudeHoldSettings() );
|
||||
objMngr.registerObject( new AttitudeActual() );
|
||||
objMngr.registerObject( new AttitudeRaw() );
|
||||
objMngr.registerObject( new AttitudeSettings() );
|
||||
objMngr.registerObject( new BaroAltitude() );
|
||||
objMngr.registerObject( new CameraDesired() );
|
||||
@ -62,16 +62,23 @@ public class UAVObjectsInitialize {
|
||||
objMngr.registerObject( new GPSPosition() );
|
||||
objMngr.registerObject( new GPSSatellites() );
|
||||
objMngr.registerObject( new GPSTime() );
|
||||
objMngr.registerObject( new GPSVelocity() );
|
||||
objMngr.registerObject( new Gyros() );
|
||||
objMngr.registerObject( new GyrosBias() );
|
||||
objMngr.registerObject( new GuidanceSettings() );
|
||||
objMngr.registerObject( new HomeLocation() );
|
||||
objMngr.registerObject( new HwSettings() );
|
||||
objMngr.registerObject( new I2CStats() );
|
||||
objMngr.registerObject( new GPSPosition() );
|
||||
objMngr.registerObject( new Magnetometer() );
|
||||
objMngr.registerObject( new ManualControlCommand() );
|
||||
objMngr.registerObject( new ManualControlSettings() );
|
||||
objMngr.registerObject( new MixerSettings() );
|
||||
objMngr.registerObject( new MixerStatus() );
|
||||
objMngr.registerObject( new NEDPosition() );
|
||||
objMngr.registerObject( new NedAccel() );
|
||||
objMngr.registerObject( new ObjectPersistence() );
|
||||
objMngr.registerObject( new PathDesired() );
|
||||
objMngr.registerObject( new PositionActual() );
|
||||
objMngr.registerObject( new PositionDesired() );
|
||||
objMngr.registerObject( new RateDesired() );
|
||||
@ -82,10 +89,13 @@ public class UAVObjectsInitialize {
|
||||
objMngr.registerObject( new SystemAlarms() );
|
||||
objMngr.registerObject( new SystemSettings() );
|
||||
objMngr.registerObject( new SystemStats() );
|
||||
objMngr.registerObject( new TxPIDSettings() );
|
||||
objMngr.registerObject( new TaskInfo() );
|
||||
objMngr.registerObject( new VelocityActual() );
|
||||
objMngr.registerObject( new VelocityDesired() );
|
||||
objMngr.registerObject( new WatchdogStatus() );
|
||||
objMngr.registerObject( new Waypoint() );
|
||||
objMngr.registerObject( new WaypointActive() );
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -53,15 +53,15 @@ public class VelocityActual extends UAVDataObject {
|
||||
|
||||
List<String> NorthElemNames = new ArrayList<String>();
|
||||
NorthElemNames.add("0");
|
||||
fields.add( new UAVObjectField("North", "cm/s", UAVObjectField.FieldType.INT32, NorthElemNames, null) );
|
||||
fields.add( new UAVObjectField("North", "m/s", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
|
||||
List<String> EastElemNames = new ArrayList<String>();
|
||||
EastElemNames.add("0");
|
||||
fields.add( new UAVObjectField("East", "cm/s", UAVObjectField.FieldType.INT32, EastElemNames, null) );
|
||||
fields.add( new UAVObjectField("East", "m/s", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
|
||||
List<String> DownElemNames = new ArrayList<String>();
|
||||
DownElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Down", "cm/s", UAVObjectField.FieldType.INT32, DownElemNames, null) );
|
||||
fields.add( new UAVObjectField("Down", "m/s", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
@ -136,7 +136,7 @@ public class VelocityActual extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x43007EB0;
|
||||
protected static final int OBJID = 0x5A08F61A;
|
||||
protected static final String NAME = "VelocityActual";
|
||||
protected static String DESCRIPTION = "Updated by @ref AHRSCommsModule and used within @ref GuidanceModule for velocity control";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
@ -53,15 +53,15 @@ public class VelocityDesired extends UAVDataObject {
|
||||
|
||||
List<String> NorthElemNames = new ArrayList<String>();
|
||||
NorthElemNames.add("0");
|
||||
fields.add( new UAVObjectField("North", "cm/s", UAVObjectField.FieldType.INT32, NorthElemNames, null) );
|
||||
fields.add( new UAVObjectField("North", "m/s", UAVObjectField.FieldType.FLOAT32, NorthElemNames, null) );
|
||||
|
||||
List<String> EastElemNames = new ArrayList<String>();
|
||||
EastElemNames.add("0");
|
||||
fields.add( new UAVObjectField("East", "cm/s", UAVObjectField.FieldType.INT32, EastElemNames, null) );
|
||||
fields.add( new UAVObjectField("East", "m/s", UAVObjectField.FieldType.FLOAT32, EastElemNames, null) );
|
||||
|
||||
List<String> DownElemNames = new ArrayList<String>();
|
||||
DownElemNames.add("0");
|
||||
fields.add( new UAVObjectField("Down", "cm/s", UAVObjectField.FieldType.INT32, DownElemNames, null) );
|
||||
fields.add( new UAVObjectField("Down", "m/s", UAVObjectField.FieldType.FLOAT32, DownElemNames, null) );
|
||||
|
||||
|
||||
// Compute the number of bytes for this object
|
||||
@ -136,7 +136,7 @@ public class VelocityDesired extends UAVDataObject {
|
||||
}
|
||||
|
||||
// Constants
|
||||
protected static final int OBJID = 0x25139D1A;
|
||||
protected static final int OBJID = 0x9E946992;
|
||||
protected static final String NAME = "VelocityDesired";
|
||||
protected static String DESCRIPTION = "Used within @ref GuidanceModule to communicate between the task computing the desired velocity and the PID loop to achieve it (running at different rates).";
|
||||
protected static final boolean ISSINGLEINST = 1 == 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user