1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-121 OP-122 Flight: Improved USB HID communication.

1. Added reenumeration function and call it on USB init (device will appear after reprogramming now)
  2. Moved buffer.c to general flight/Libraries location
  3. Removed the 62 byte transmission limitation by adding a transmission buffer
  4. Sped up USB communication by increasing endpoint polling frequency

Note, that the nonblocking and blocking USB send functions are not blocking entirely correcting.  The blocking calls the nonblocking, and the nonblocking blocks until the last chunk has started tranmission if it's a big transmission.  The buffering I added would generalize to non-blocking nicely, but would require using the EP1(IN) callback to handle most of the tranmission.  This creates a lot of issues if one function is pushing data onto the buffer and the interrupt is sending.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1403 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-08-25 05:32:52 +00:00 committed by peabody124
parent b467b419e6
commit 4ca10e92c7
9 changed files with 402 additions and 210 deletions

244
flight/Libraries/buffer.c Normal file
View File

@ -0,0 +1,244 @@
/**
******************************************************************************
*
* @addtogroup OpenPilotModules OpenPilot Modules
* @{
* @addtogroup Flight_Libraries Miscellaneous library functions
* @brief Miscellaneous library functions shared between PIOS / OpenPilot / AHRS
* @{
*
* @file buffer.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Simplies buffering data
* @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
*/
//*****************************************************************************
//
// File Name : 'buffer.c'
// Title : Multipurpose byte buffer structure and methods
// Author : Pascal Stang - Copyright (C) 2001-2002
// Created : 9/23/2001
// Revised : 9/23/2001
// Version : 1.0
// Target MCU : any
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#include "buffer.h"
/**
* @brief Initialize a cBuffer structure
* @param[in] buffer Points to the buffer structure
* @param[in] start Allocated memory to store data
* @param[in] size Maximum size of buffer
* @return None
*/
void bufferInit(cBuffer* buffer, uint8_t *start, uint32_t size)
{
// set start pointer of the buffer
buffer->dataptr = start;
buffer->size = size;
// initialize index and length
buffer->dataindex = 0;
buffer->datalength = 0;
}
/**
* @brief Return remaining space in buffer
* @param[in] buffer Pointer to buffer structure
* @return Amount of space remaining on buffer
*/
uint32_t bufferRemainingSpace(cBuffer* buffer)
{
return buffer->size - buffer->datalength;
}
/**
* @brief Return amount of data
* @param[in] buffer Pointer to buffer structure
* @return Amount of data queued in buffer
*/
uint32_t bufferBufferedData(cBuffer* buffer)
{
return buffer->datalength;
}
/**
* @brief Pop one element from buffer
* @param[in] buffer Pointer to the buffer structure
* @return None
*/
uint8_t bufferGetFromFront(cBuffer* buffer)
{
unsigned char data = 0;
// check to see if there's data in the buffer
if(buffer->datalength)
{
// get the first character from buffer
data = buffer->dataptr[buffer->dataindex];
// move index down and decrement length
buffer->dataindex++;
if(buffer->dataindex >= buffer->size)
{
buffer->dataindex %= buffer->size;
}
buffer->datalength--;
}
// return
return data;
}
/**
* @brief Copy number of elements into another buffer
* @param[in] buffer Pointer to the buffer structure
* @param[in] dest Point to destimation, must be allocated enough space for size
* @param[in] size Number of elements to get
* @return
* @arg -1 for success
* @arg 0 error
*/
uint8_t bufferGetChunkFromFront(cBuffer* buffer, uint8_t * dest, uint32_t size)
{
if(size > buffer->datalength)
return -1;
for(uint32_t i = 0; i < size; i++)
{
dest[i] = bufferGetFromFront(buffer);
}
return 0;
}
/**
* @brief Shift index to trash data from front of buffer
* @param[in] buffer Pointer to buffer structure
* @param[in] numbytes Number of bytes to drop
* @return None
*/
void bufferDumpFromFront(cBuffer* buffer, uint32_t numbytes)
{
// dump numbytes from the front of the buffer
// are we dumping less than the entire buffer?
if(numbytes < buffer->datalength)
{
// move index down by numbytes and decrement length by numbytes
buffer->dataindex += numbytes;
if(buffer->dataindex >= buffer->size)
{
buffer->dataindex %= buffer->size;
}
buffer->datalength -= numbytes;
}
else
{
// flush the whole buffer
buffer->datalength = 0;
}
}
/**
* @brief Get element indexed from the front of buffer
* @param[in] buffer Point to the buffer structure
* @param[in] index Index into the buffer relative to front
* @return None
*/
uint8_t bufferGetAtIndex(cBuffer* buffer, uint32_t index)
{
// return character at index in buffer
return buffer->dataptr[(buffer->dataindex+index)%(buffer->size)];
}
/**
* @brief Queue a character to end of buffer
* @param[in] buffer Point to the buffer structure
* @param[in] data Byte to add
* @return
* @arg -1 for success
* @arg 0 error
*/
uint8_t bufferAddToEnd(cBuffer* buffer, uint8_t data)
{
// make sure the buffer has room
if(buffer->datalength < buffer->size)
{
// save data byte at end of buffer
buffer->dataptr[(buffer->dataindex + buffer->datalength) % buffer->size] = data;
// increment the length
buffer->datalength++;
// return success
return -1;
}
else return 0;
}
/**
* @brief Queue a block of character to end of buffer
* @param[in] buffer Point to the buffer structure
* @param[in] data Pointer to data to add
* @param[in] size Number of bytes to add
* @return
* @arg -1 for success
* @arg 0 error
*/
uint8_t bufferAddChunkToEnd(cBuffer* buffer, const uint8_t * data, uint32_t size)
{
// TODO: replace with memcpy and logic, for now keeping it simple
for(uint32_t i = 0; i < size; i++)
{
if(bufferAddToEnd(buffer,data[i]) == 0)
return 0;
}
return -1;
}
/**
* @brief Check to see if the buffer has room
* @param[in] buffer Point to the buffer structure
* @return
* @arg True there is room available in buffer
* @arg False buffer is full
*/
unsigned char bufferIsNotFull(cBuffer* buffer)
{
return (buffer->datalength < buffer->size);
}
/**
* @brief Trash all data in buffer
* @param[in] buffer Point to the buffer structure
*/
void bufferFlush(cBuffer* buffer)
{
// flush contents of the buffer
buffer->datalength = 0;
}
/**
* @}
* @}
*/

View File

@ -50,6 +50,8 @@
#ifndef BUFFER_H
#define BUFFER_H
#include "stdint.h"
// structure/typdefs
//! cBuffer structure
@ -64,23 +66,35 @@ typedef struct struct_cBuffer
// function prototypes
//! initialize a buffer to start at a given address and have given size
void bufferInit(cBuffer* buffer, unsigned char *start, unsigned short size);
void bufferInit(cBuffer* buffer, uint8_t *start, uint32_t size);
//! check free space in buffer
uint32_t bufferRemainingSpace(cBuffer* buffer);
//! get the first byte from the front of the buffer
unsigned char bufferGetFromFront(cBuffer* buffer);
uint8_t bufferGetFromFront(cBuffer* buffer);
//! get the number of bytes buffered
uint32_t bufferBufferedData(cBuffer* buffer);
//! copy number of elements into another buffer
uint8_t bufferGetChunkFromFront(cBuffer* buffer, uint8_t * dest, uint32_t size);
//! dump (discard) the first numbytes from the front of the buffer
void bufferDumpFromFront(cBuffer* buffer, unsigned short numbytes);
void bufferDumpFromFront(cBuffer* buffer, uint32_t numbytes);
//! get a byte at the specified index in the buffer (kind of like array access)
// ** note: this does not remove the byte that was read from the buffer
unsigned char bufferGetAtIndex(cBuffer* buffer, unsigned short index);
uint8_t bufferGetAtIndex(cBuffer* buffer, uint32_t index);
//! add a byte to the end of the buffer
unsigned char bufferAddToEnd(cBuffer* buffer, unsigned char data);
uint8_t bufferAddToEnd(cBuffer* buffer, uint8_t data);
//! queue a block of character to end of buffer
uint8_t bufferAddChunkToEnd(cBuffer* buffer, const uint8_t * data, uint32_t size);
//! check if the buffer is full/not full (returns non-zero value if not full)
unsigned char bufferIsNotFull(cBuffer* buffer);
uint8_t bufferIsNotFull(cBuffer* buffer);
//! flush (clear) the contents of the buffer
void bufferFlush(cBuffer* buffer);

View File

@ -211,6 +211,7 @@ SRC += $(PIOSCOMMON)/pios_opahrs_proto.c
SRC += $(PIOSCOMMON)/printf-stdarg.c
## Libraries for flight calculations
SRC += $(FLIGHTLIB)/buffer.c
SRC += $(FLIGHTLIB)/WorldMagModel.c
SRC += $(FLIGHTLIB)/CoordinateConversions.c

View File

@ -1,148 +0,0 @@
/**
******************************************************************************
*
* @addtogroup OpenPilotModules OpenPilot Modules
* @{
* @addtogroup GSPModule GPS Module
* @brief Process GPS information
* @{
*
* @file buffer.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief
* As with all modules only the initialize function is exposed all other
* interactions with the module take place through the event queue and
* objects.
* @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
*/
//*****************************************************************************
//
// File Name : 'buffer.c'
// Title : Multipurpose byte buffer structure and methods
// Author : Pascal Stang - Copyright (C) 2001-2002
// Created : 9/23/2001
// Revised : 9/23/2001
// Version : 1.0
// Target MCU : any
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
#include "buffer.h"
// global variables
// initialization
void bufferInit(cBuffer* buffer, unsigned char *start, unsigned short size)
{
// set start pointer of the buffer
buffer->dataptr = start;
buffer->size = size;
// initialize index and length
buffer->dataindex = 0;
buffer->datalength = 0;
}
// access routines
unsigned char bufferGetFromFront(cBuffer* buffer)
{
unsigned char data = 0;
// check to see if there's data in the buffer
if(buffer->datalength)
{
// get the first character from buffer
data = buffer->dataptr[buffer->dataindex];
// move index down and decrement length
buffer->dataindex++;
if(buffer->dataindex >= buffer->size)
{
buffer->dataindex %= buffer->size;
}
buffer->datalength--;
}
// return
return data;
}
void bufferDumpFromFront(cBuffer* buffer, unsigned short numbytes)
{
// dump numbytes from the front of the buffer
// are we dumping less than the entire buffer?
if(numbytes < buffer->datalength)
{
// move index down by numbytes and decrement length by numbytes
buffer->dataindex += numbytes;
if(buffer->dataindex >= buffer->size)
{
buffer->dataindex %= buffer->size;
}
buffer->datalength -= numbytes;
}
else
{
// flush the whole buffer
buffer->datalength = 0;
}
}
unsigned char bufferGetAtIndex(cBuffer* buffer, unsigned short index)
{
// return character at index in buffer
return buffer->dataptr[(buffer->dataindex+index)%(buffer->size)];
}
unsigned char bufferAddToEnd(cBuffer* buffer, unsigned char data)
{
// make sure the buffer has room
if(buffer->datalength < buffer->size)
{
// save data byte at end of buffer
buffer->dataptr[(buffer->dataindex + buffer->datalength) % buffer->size] = data;
// increment the length
buffer->datalength++;
// return success
return -1;
}
else return 0;
}
unsigned char bufferIsNotFull(cBuffer* buffer)
{
// check to see if the buffer has room
// return true if there is room
return (buffer->datalength < buffer->size);
}
void bufferFlush(cBuffer* buffer)
{
// flush contents of the buffer
buffer->datalength = 0;
}
/**
* @}
* @}
*/

View File

@ -36,6 +36,7 @@
#include "usb_lib.h"
#include "pios_usb_hid_desc.h"
#include "stm32f10x.h"
#include "buffer.h"
#if defined(PIOS_INCLUDE_USB_HID)
@ -56,6 +57,12 @@ static uint8_t transfer_possible = 0;
static uint8_t rx_buffer[PIOS_USB_HID_DATA_LENGTH+2] = {0};
static uint8_t tx_buffer[PIOS_USB_HID_DATA_LENGTH+2] = {0};
#define TX_BUFFER_SIZE 128
#define RX_BUFFER_SIZE 128
cBuffer rxBuffer;
cBuffer txBuffer;
static uint8_t rxBufferSpace[TX_BUFFER_SIZE];
static uint8_t txBufferSpace[RX_BUFFER_SIZE];
/**
* Initialises USB COM layer
* \param[in] mode currently only mode 0 supported
@ -70,6 +77,10 @@ int32_t PIOS_USB_HID_Init(uint32_t mode)
return -1;
}
bufferInit(&rxBuffer, &rxBufferSpace[0], RX_BUFFER_SIZE);
bufferInit(&txBuffer, &txBufferSpace[0], TX_BUFFER_SIZE);
PIOS_USB_HID_Reenumerate();
/* Enable the USB Interrupts */
/* 2 bit for pre-emption priority, 2 bits for subpriority */
@ -89,7 +100,7 @@ int32_t PIOS_USB_HID_Init(uint32_t mode)
/* Update the USB serial number from the chip */
uint8_t sn[40];
PIOS_SYS_SerialNumberGet((char *) sn);
/* uint8_t len = 0;;
/* uint8_t len = 0;;
for(uint8_t i = 0, len = 2; sn[i] != '\0' && len < PIOS_HID_StringSerial[0]; ++i)
{
PIOS_HID_StringSerial[len++] = sn[i];
@ -104,7 +115,6 @@ int32_t PIOS_USB_HID_Init(uint32_t mode)
PIOS_HID_StringSerial[2+i*2] = sn[i];
}
USB_Init();
USB_SIL_Init();
@ -130,6 +140,43 @@ int32_t PIOS_USB_HID_ChangeConnectionState(uint32_t Connected)
return 0;
}
int32_t PIOS_USB_HID_Reenumerate()
{
/* Force USB reset and power-down (this will also release the USB pins for direct GPIO control) */
_SetCNTR(CNTR_FRES | CNTR_PDWN);
/* Using a "dirty" method to force a re-enumeration: */
/* Force DPM (Pin PA12) low for ca. 10 mS before USB Tranceiver will be enabled */
/* This overrules the external Pull-Up at PA12, and at least Windows & MacOS will enumerate again */
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
PIOS_DELAY_WaitmS(50);
/* Release power-down, still hold reset */
_SetCNTR(CNTR_PDWN);
PIOS_DELAY_WaituS(5);
/* CNTR_FRES = 0 */
_SetCNTR(0);
/* Clear pending interrupts */
_SetISTR(0);
/* Configure USB clock */
/* USBCLK = PLLCLK / 1.5 */
RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5);
/* Enable USB clock */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE);
return 0;
}
/**
* This function returns the connection status of the USB HID interface
* \return 1: interface available
@ -141,6 +188,31 @@ int32_t PIOS_USB_HID_CheckAvailable(uint8_t id)
return (PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) != 0 && transfer_possible ? 1 : 0;
}
void sendChunk()
{
uint32_t size = bufferBufferedData(&txBuffer);
if(size > 0)
{
if(size > PIOS_USB_HID_DATA_LENGTH)
size = PIOS_USB_HID_DATA_LENGTH;
bufferGetChunkFromFront(&txBuffer, &tx_buffer[2], size);
tx_buffer[0] = 1; /* report ID */
tx_buffer[1] = size; /* valid data length */
/* Wait for any pending transmissions to complete */
while(GetEPTxStatus(ENDP1) == EP_TX_VALID)
taskYIELD();
UserToPMABufferCopy((uint8_t*) tx_buffer, GetEPTxAddr(EP1_IN & 0x7F), size+2);
SetEPTxCount((EP1_IN & 0x7F), PIOS_USB_HID_DATA_LENGTH+2);
/* Send Buffer */
SetEPTxValid(ENDP1);
}
}
/**
* Puts more than one byte onto the transmit buffer (used for atomic sends)
* \param[in] *buffer pointer to buffer which should be transmitted
@ -151,19 +223,19 @@ int32_t PIOS_USB_HID_CheckAvailable(uint8_t id)
*/
int32_t PIOS_USB_HID_TxBufferPutMoreNonBlocking(uint8_t id, const uint8_t *buffer, uint16_t len)
{
if(len > PIOS_USB_HID_DATA_LENGTH) {
/* Cannot send all requested bytes */
/*if( len > PIOS_USB_HID_DATA_LENGTH )
return - 1;*/
if(len > bufferRemainingSpace(&txBuffer))
return -1; /* Cannot send all requested bytes */
if(bufferAddChunkToEnd(&txBuffer, buffer, len) == 0)
return -1;
}
memcpy(&tx_buffer[2], buffer, len);
tx_buffer[0] = 1; /* report ID */
tx_buffer[1] = len; /* valid data length */
UserToPMABufferCopy((uint8_t*) tx_buffer, GetEPTxAddr(EP1_IN & 0x7F), len+2);
SetEPTxCount((EP1_IN & 0x7F), PIOS_USB_HID_DATA_LENGTH+2);
while(bufferBufferedData(&txBuffer))
sendChunk();
bufferFlush(&txBuffer);
/* Send Buffer */
SetEPTxValid(ENDP1);
//PIOS_USB_HID_EP1_IN_Callback();
return 0;
}
@ -221,6 +293,15 @@ int32_t PIOS_USB_HID_RxBufferUsed(uint8_t id)
}
/**
* @brief Callback used to indicate a transmission from device INto host completed
* Checks if any data remains, pads it into HID packet and sends.
*/
void PIOS_USB_HID_EP1_IN_Callback(void)
{
//sendChunk();
}
/**
* EP1 OUT Callback Routine
*/

View File

@ -102,7 +102,7 @@ const uint8_t PIOS_HID_ConfigDescriptor[PIOS_HID_SIZ_CONFIG_DESC] =
0x03, /* bmAttributes: Interrupt endpoint */
0x40, /* wMaxPacketSize: 2 Bytes max */
0x00,
0x08, /* bInterval: Polling Interval (32 ms) */
0x01, /* bInterval: Polling Interval (32 ms) */
/* 34 */
0x07, /* bLength: Endpoint Descriptor size */
@ -113,7 +113,7 @@ const uint8_t PIOS_HID_ConfigDescriptor[PIOS_HID_SIZ_CONFIG_DESC] =
0x03, /* bmAttributes: Interrupt endpoint */
0x40, /* wMaxPacketSize: 2 Bytes max */
0x00,
0x08, /* bInterval: Polling Interval (20 ms) */
0x01, /* bInterval: Polling Interval (20 ms) */
/* 41 */
}
; /* PIOS_HID_ConfigDescriptor */

View File

@ -32,18 +32,18 @@ __IO uint8_t bIntPackSOF = 0; /* SOFs received between 2 consecutive packets */
/* Private functions ---------------------------------------------------------*/
/* function pointers to non-control endpoints service routines */
void (*pEpInt_IN[7])(void) =
{
EP1_IN_Callback, //PIOS_USB_HID_TxNextByte,
{
EP1_IN_Callback, //PIOS_USB_HID_EP1_IN_Callback,
EP2_IN_Callback,
EP3_IN_Callback,
EP4_IN_Callback,
EP5_IN_Callback,
EP6_IN_Callback,
EP7_IN_Callback,
};
};
void (*pEpInt_OUT[7])(void) =
{
{
PIOS_USB_HID_EP1_OUT_Callback,
EP2_OUT_Callback,
EP3_OUT_Callback,
@ -51,7 +51,7 @@ void (*pEpInt_OUT[7])(void) =
EP5_OUT_Callback,
EP6_OUT_Callback,
EP7_OUT_Callback,
};
};
#ifndef STM32F10X_CL

View File

@ -42,6 +42,7 @@
/* Global functions */
extern int32_t PIOS_USB_HID_Init(uint32_t mode);
extern int32_t PIOS_USB_HID_Reenumerate();
extern int32_t PIOS_USB_HID_ChangeConnectionState(uint32_t Connected);
extern int32_t PIOS_USB_HID_CheckAvailable(uint8_t id);
extern int32_t PIOS_USB_HID_TxBufferPutMoreNonBlocking(uint8_t id, const uint8_t *buffer, uint16_t len);
@ -50,6 +51,7 @@ extern int32_t PIOS_USB_HID_RxBufferGet(uint8_t id);
extern int32_t PIOS_USB_HID_RxBufferUsed(uint8_t id);
extern int32_t PIOS_USB_HID_CB_Data_Setup(uint8_t RequestNo);
extern int32_t PIOS_USB_HID_CB_NoData_Setup(uint8_t RequestNo);
extern void PIOS_USB_HID_EP1_IN_Callback(void);
extern void PIOS_USB_HID_EP1_OUT_Callback(void);
#endif /* PIOS_USB_HID_H */

View File

@ -2579,6 +2579,12 @@
65B7E6B4120DF1E2000C1123 /* pios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_config.h; sourceTree = "<group>"; };
65B7E6B6120DF1E2000C1123 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../AHRS/Makefile; sourceTree = SOURCE_ROOT; };
65B7E6B7120DF1E2000C1123 /* pios_board.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pios_board.c; path = ../../AHRS/pios_board.c; sourceTree = SOURCE_ROOT; };
65C2595112249D9C0081B6ED /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buffer.c; sourceTree = "<group>"; };
65C2595212249DA60081B6ED /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
65C259551224BFAF0081B6ED /* ahrscalibration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrscalibration.c; sourceTree = "<group>"; };
65C259561224BFAF0081B6ED /* ahrssettings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahrssettings.c; sourceTree = "<group>"; };
65C259571224BFAF0081B6ED /* baroaltitude.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = baroaltitude.c; sourceTree = "<group>"; };
65C259581224BFAF0081B6ED /* gpsposition.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gpsposition.c; sourceTree = "<group>"; };
65E8EF1F11EEA61E00BBF654 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../OpenPilot/Makefile; sourceTree = SOURCE_ROOT; };
65E8EF2011EEA61E00BBF654 /* Makefile.posix */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Makefile.posix; path = ../../OpenPilot/Makefile.posix; sourceTree = SOURCE_ROOT; };
65E8EF2311EEA61E00BBF654 /* actuator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = actuator.c; path = ../../OpenPilot/Modules/Actuator/actuator.c; sourceTree = SOURCE_ROOT; };
@ -2596,9 +2602,7 @@
65E8EF3A11EEA61E00BBF654 /* examplemodevent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = examplemodevent.h; path = ../../OpenPilot/Modules/Example/inc/examplemodevent.h; sourceTree = SOURCE_ROOT; };
65E8EF3B11EEA61E00BBF654 /* examplemodperiodic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = examplemodperiodic.h; path = ../../OpenPilot/Modules/Example/inc/examplemodperiodic.h; sourceTree = SOURCE_ROOT; };
65E8EF3C11EEA61E00BBF654 /* examplemodthread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = examplemodthread.h; path = ../../OpenPilot/Modules/Example/inc/examplemodthread.h; sourceTree = SOURCE_ROOT; };
65E8EF3E11EEA61E00BBF654 /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buffer.c; path = ../../OpenPilot/Modules/GPS/buffer.c; sourceTree = SOURCE_ROOT; };
65E8EF3F11EEA61E00BBF654 /* GPS.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = GPS.c; path = ../../OpenPilot/Modules/GPS/GPS.c; sourceTree = SOURCE_ROOT; };
65E8EF4111EEA61E00BBF654 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = buffer.h; path = ../../OpenPilot/Modules/GPS/inc/buffer.h; sourceTree = SOURCE_ROOT; };
65E8EF4211EEA61E00BBF654 /* GPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GPS.h; path = ../../OpenPilot/Modules/GPS/inc/GPS.h; sourceTree = SOURCE_ROOT; };
65E8EF4511EEA61E00BBF654 /* manualcontrol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = manualcontrol.h; path = ../../OpenPilot/Modules/ManualControl/inc/manualcontrol.h; sourceTree = SOURCE_ROOT; };
65E8EF4611EEA61E00BBF654 /* manualcontrol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = manualcontrol.c; path = ../../OpenPilot/Modules/ManualControl/manualcontrol.c; sourceTree = SOURCE_ROOT; };
@ -2631,11 +2635,8 @@
65E8EF7011EEA61E00BBF654 /* actuatordesired.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = actuatordesired.c; path = ../../OpenPilot/UAVObjects/actuatordesired.c; sourceTree = SOURCE_ROOT; };
65E8EF7111EEA61E00BBF654 /* actuatorsettings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = actuatorsettings.c; path = ../../OpenPilot/UAVObjects/actuatorsettings.c; sourceTree = SOURCE_ROOT; };
65E8EF7211EEA61E00BBF654 /* ahrsstatus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ahrsstatus.c; path = ../../OpenPilot/UAVObjects/ahrsstatus.c; sourceTree = SOURCE_ROOT; };
65E8EF7311EEA61E00BBF654 /* altitudeactual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = altitudeactual.c; path = ../../OpenPilot/UAVObjects/altitudeactual.c; sourceTree = SOURCE_ROOT; };
65E8EF7411EEA61E00BBF654 /* attitudeactual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = attitudeactual.c; path = ../../OpenPilot/UAVObjects/attitudeactual.c; sourceTree = SOURCE_ROOT; };
65E8EF7511EEA61E00BBF654 /* attitudedesired.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = attitudedesired.c; path = ../../OpenPilot/UAVObjects/attitudedesired.c; sourceTree = SOURCE_ROOT; };
65E8EF7611EEA61E00BBF654 /* attitudesettings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = attitudesettings.c; path = ../../OpenPilot/UAVObjects/attitudesettings.c; sourceTree = SOURCE_ROOT; };
65E8EF7711EEA61E00BBF654 /* attitudesettings.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = attitudesettings.py; path = ../../OpenPilot/UAVObjects/attitudesettings.py; sourceTree = SOURCE_ROOT; };
65E8EF7811EEA61E00BBF654 /* eventdispatcher.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eventdispatcher.c; path = ../../OpenPilot/UAVObjects/eventdispatcher.c; sourceTree = SOURCE_ROOT; };
65E8EF7911EEA61E00BBF654 /* exampleobject1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = exampleobject1.c; path = ../../OpenPilot/UAVObjects/exampleobject1.c; sourceTree = SOURCE_ROOT; };
65E8EF7A11EEA61E00BBF654 /* exampleobject2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = exampleobject2.c; path = ../../OpenPilot/UAVObjects/exampleobject2.c; sourceTree = SOURCE_ROOT; };
@ -2850,8 +2851,6 @@
65E8F0EA11EFF25C00BBF654 /* pios_usart.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pios_usart.c; path = ../../PiOS/STM32F10x/pios_usart.c; sourceTree = SOURCE_ROOT; };
65E8F0ED11EFF25C00BBF654 /* pios_usb_hid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pios_usb_hid.c; path = ../../PiOS/STM32F10x/pios_usb_hid.c; sourceTree = SOURCE_ROOT; };
65E8F0EE11EFF25C00BBF654 /* startup_stm32f10x_HD.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = startup_stm32f10x_HD.S; path = ../../PiOS/STM32F10x/startup_stm32f10x_HD.S; sourceTree = SOURCE_ROOT; };
65E8F0EF11EFF25C00BBF654 /* startup_stm32f10x_HD_BL.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = startup_stm32f10x_HD_BL.S; path = ../../PiOS/STM32F10x/startup_stm32f10x_HD_BL.S; sourceTree = SOURCE_ROOT; };
65E8F0F011EFF25C00BBF654 /* startup_stm32f10x_HD_NB.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = startup_stm32f10x_HD_NB.S; path = ../../PiOS/STM32F10x/startup_stm32f10x_HD_NB.S; sourceTree = SOURCE_ROOT; };
65E8F0F111EFF25C00BBF654 /* startup_stm32f10x_MD.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = startup_stm32f10x_MD.S; path = ../../PiOS/STM32F10x/startup_stm32f10x_MD.S; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
@ -2905,6 +2904,7 @@
657CEEB6121DBC63007A1FBE /* Libraries */ = {
isa = PBXGroup;
children = (
65C2595112249D9C0081B6ED /* buffer.c */,
657CEEB7121DBC63007A1FBE /* CoordinateConversions.c */,
657CEEB8121DBC63007A1FBE /* inc */,
657CEEBB121DBC63007A1FBE /* WorldMagModel.c */,
@ -2916,6 +2916,7 @@
657CEEB8121DBC63007A1FBE /* inc */ = {
isa = PBXGroup;
children = (
65C2595212249DA60081B6ED /* buffer.h */,
657CF024121F49CD007A1FBE /* WMMInternal.h */,
657CEEB9121DBC63007A1FBE /* CoordinateConversions.h */,
657CEEBA121DBC63007A1FBE /* WorldMagModel.h */,
@ -6885,7 +6886,6 @@
65E8EF3D11EEA61E00BBF654 /* GPS */ = {
isa = PBXGroup;
children = (
65E8EF3E11EEA61E00BBF654 /* buffer.c */,
65E8EF3F11EEA61E00BBF654 /* GPS.c */,
65E8EF4011EEA61E00BBF654 /* inc */,
);
@ -6896,7 +6896,6 @@
65E8EF4011EEA61E00BBF654 /* inc */ = {
isa = PBXGroup;
children = (
65E8EF4111EEA61E00BBF654 /* buffer.h */,
65E8EF4211EEA61E00BBF654 /* GPS.h */,
);
name = inc;
@ -7069,6 +7068,9 @@
65E8EF6E11EEA61E00BBF654 /* UAVObjects */ = {
isa = PBXGroup;
children = (
65C259551224BFAF0081B6ED /* ahrscalibration.c */,
65C259561224BFAF0081B6ED /* ahrssettings.c */,
65C259571224BFAF0081B6ED /* baroaltitude.c */,
657CEEBF121DC054007A1FBE /* attituderaw.c */,
657CEEC0121DC054007A1FBE /* flightsituationactual.c */,
657CEEC1121DC054007A1FBE /* homelocation.c */,
@ -7078,11 +7080,8 @@
65E8EF7011EEA61E00BBF654 /* actuatordesired.c */,
65E8EF7111EEA61E00BBF654 /* actuatorsettings.c */,
65E8EF7211EEA61E00BBF654 /* ahrsstatus.c */,
65E8EF7311EEA61E00BBF654 /* altitudeactual.c */,
65E8EF7411EEA61E00BBF654 /* attitudeactual.c */,
65E8EF7511EEA61E00BBF654 /* attitudedesired.c */,
65E8EF7611EEA61E00BBF654 /* attitudesettings.c */,
65E8EF7711EEA61E00BBF654 /* attitudesettings.py */,
65E8EF7811EEA61E00BBF654 /* eventdispatcher.c */,
65E8EF7911EEA61E00BBF654 /* exampleobject1.c */,
65E8EF7A11EEA61E00BBF654 /* exampleobject2.c */,
@ -7090,6 +7089,7 @@
65E8EF7C11EEA61E00BBF654 /* flightbatterystate.c */,
65E8EF7D11EEA61E00BBF654 /* flighttelemetrystats.c */,
65E8EF7E11EEA61E00BBF654 /* gcstelemetrystats.c */,
65C259581224BFAF0081B6ED /* gpsposition.c */,
65E8EF8011EEA61E00BBF654 /* inc */,
65E8EF9E11EEA61E00BBF654 /* manualcontrolcommand.c */,
65E8EF9F11EEA61E00BBF654 /* manualcontrolsettings.c */,
@ -7265,8 +7265,6 @@
651CF9E8120B5D8300EEFD70 /* pios_usb_hid_pwr.c */,
65003B31121249CA00C183DD /* pios_wdg.c */,
65E8F0EE11EFF25C00BBF654 /* startup_stm32f10x_HD.S */,
65E8F0EF11EFF25C00BBF654 /* startup_stm32f10x_HD_BL.S */,
65E8F0F011EFF25C00BBF654 /* startup_stm32f10x_HD_NB.S */,
65E8F0F111EFF25C00BBF654 /* startup_stm32f10x_MD.S */,
);
name = STM32F10x;