2010-08-23 05:39:13 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
2010-08-27 02:15:42 +02:00
|
|
|
* @addtogroup UAVObjects OpenPilot UAVObjects
|
|
|
|
* @{
|
|
|
|
* @addtogroup AHRSSettings AHRSSettings
|
|
|
|
* @brief Settings for the @ref AHRSCommsModule to control the algorithm and what is updated
|
|
|
|
*
|
|
|
|
* Autogenerated files and functions for AHRSSettings Object
|
|
|
|
|
|
|
|
* @{
|
2010-08-23 05:39:13 +02:00
|
|
|
*
|
|
|
|
* @file ahrssettings.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @brief Implementation of the AHRSSettings object. This file has been
|
|
|
|
* automatically generated by the UAVObjectGenerator.
|
|
|
|
*
|
|
|
|
* @note Object definition file: ahrssettings.xml.
|
|
|
|
* This is an automatically generated file.
|
|
|
|
* DO NOT modify manually.
|
|
|
|
*
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AHRSSETTINGS_H
|
|
|
|
#define AHRSSETTINGS_H
|
|
|
|
|
|
|
|
// Object constants
|
2010-12-04 18:34:25 +01:00
|
|
|
#define AHRSSETTINGS_OBJID 3741078856U
|
2010-08-23 05:39:13 +02:00
|
|
|
#define AHRSSETTINGS_NAME "AHRSSettings"
|
|
|
|
#define AHRSSETTINGS_METANAME "AHRSSettingsMeta"
|
|
|
|
#define AHRSSETTINGS_ISSINGLEINST 1
|
|
|
|
#define AHRSSETTINGS_ISSETTINGS 1
|
|
|
|
#define AHRSSETTINGS_NUMBYTES sizeof(AHRSSettingsData)
|
|
|
|
|
|
|
|
// Object access macros
|
2010-08-27 02:15:42 +02:00
|
|
|
/**
|
|
|
|
* @function AHRSSettingsGet(dataOut)
|
|
|
|
* @brief Populate a AHRSSettingsData object
|
|
|
|
* @param[out] dataOut
|
|
|
|
*/
|
2010-08-23 05:39:13 +02:00
|
|
|
#define AHRSSettingsGet(dataOut) UAVObjGetData(AHRSSettingsHandle(), dataOut)
|
|
|
|
#define AHRSSettingsSet(dataIn) UAVObjSetData(AHRSSettingsHandle(), dataIn)
|
|
|
|
#define AHRSSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(AHRSSettingsHandle(), instId, dataOut)
|
|
|
|
#define AHRSSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(AHRSSettingsHandle(), instId, dataIn)
|
|
|
|
#define AHRSSettingsConnectQueue(queue) UAVObjConnectQueue(AHRSSettingsHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
|
|
#define AHRSSettingsConnectCallback(cb) UAVObjConnectCallback(AHRSSettingsHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
|
|
#define AHRSSettingsCreateInstance() UAVObjCreateInstance(AHRSSettingsHandle())
|
|
|
|
#define AHRSSettingsRequestUpdate() UAVObjRequestUpdate(AHRSSettingsHandle())
|
|
|
|
#define AHRSSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(AHRSSettingsHandle(), instId)
|
|
|
|
#define AHRSSettingsUpdated() UAVObjUpdated(AHRSSettingsHandle())
|
|
|
|
#define AHRSSettingsInstUpdated(instId) UAVObjUpdated(AHRSSettingsHandle(), instId)
|
|
|
|
#define AHRSSettingsGetMetadata(dataOut) UAVObjGetMetadata(AHRSSettingsHandle(), dataOut)
|
|
|
|
#define AHRSSettingsSetMetadata(dataIn) UAVObjSetMetadata(AHRSSettingsHandle(), dataIn)
|
2010-08-27 02:15:48 +02:00
|
|
|
#define AHRSSettingsReadOnly(dataIn) UAVObjReadOnly(AHRSSettingsHandle())
|
2010-08-23 05:39:13 +02:00
|
|
|
|
|
|
|
// Object data
|
|
|
|
typedef struct {
|
|
|
|
uint8_t Algorithm;
|
2010-10-02 05:10:01 +02:00
|
|
|
uint8_t Downsampling;
|
2010-10-03 20:14:34 +02:00
|
|
|
uint8_t UpdatePeriod;
|
2010-12-04 18:34:25 +01:00
|
|
|
uint8_t BiasCorrectedRaw;
|
2010-10-03 20:14:34 +02:00
|
|
|
float YawBias;
|
|
|
|
float PitchBias;
|
|
|
|
float RollBias;
|
2010-08-23 05:39:13 +02:00
|
|
|
|
|
|
|
} __attribute__((packed)) AHRSSettingsData;
|
|
|
|
|
|
|
|
// Field information
|
|
|
|
// Field Algorithm information
|
|
|
|
/* Enumeration options for field Algorithm */
|
2010-10-02 05:10:01 +02:00
|
|
|
typedef enum { AHRSSETTINGS_ALGORITHM_SIMPLE=0, AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR_NOMAG=1, AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR=2, AHRSSETTINGS_ALGORITHM_INSGPS_OUTDOOR=3 } AHRSSettingsAlgorithmOptions;
|
|
|
|
// Field Downsampling information
|
2010-08-23 05:39:13 +02:00
|
|
|
// Field UpdatePeriod information
|
2010-12-04 18:34:25 +01:00
|
|
|
// Field BiasCorrectedRaw information
|
|
|
|
/* Enumeration options for field BiasCorrectedRaw */
|
|
|
|
typedef enum { AHRSSETTINGS_BIASCORRECTEDRAW_TRUE=0, AHRSSETTINGS_BIASCORRECTEDRAW_FALSE=1 } AHRSSettingsBiasCorrectedRawOptions;
|
2010-10-03 20:14:34 +02:00
|
|
|
// Field YawBias information
|
|
|
|
// Field PitchBias information
|
|
|
|
// Field RollBias information
|
2010-08-23 05:39:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t AHRSSettingsInitialize();
|
|
|
|
UAVObjHandle AHRSSettingsHandle();
|
|
|
|
|
|
|
|
#endif // AHRSSETTINGS_H
|
2010-08-27 02:15:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
2010-09-03 01:55:24 +02:00
|
|
|
*/
|