1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-265 CopterControl: Fork main OpenPilot directory

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2416 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2011-01-14 01:38:24 +00:00 committed by peabody124
parent fc54159369
commit 940792db5c
14 changed files with 200 additions and 144 deletions

180
.gitignore vendored
View File

@ -67,94 +67,94 @@
#ignore autogenerated files - they should really go into special dirs to be ignored more easy
flight/OpenPilot/UAVObjects/actuatorcommand.c
flight/OpenPilot/UAVObjects/actuatordesired.c
flight/OpenPilot/UAVObjects/actuatorsettings.c
flight/OpenPilot/UAVObjects/ahrscalibration.c
flight/OpenPilot/UAVObjects/ahrssettings.c
flight/OpenPilot/UAVObjects/ahrsstatus.c
flight/OpenPilot/UAVObjects/attitudeactual.c
flight/OpenPilot/UAVObjects/attitudedesired.c
flight/OpenPilot/UAVObjects/attituderaw.c
flight/OpenPilot/UAVObjects/baroaltitude.c
flight/OpenPilot/UAVObjects/batterysettings.c
flight/OpenPilot/UAVObjects/firmwareiapobj.c
flight/OpenPilot/UAVObjects/flightbatterystate.c
flight/OpenPilot/UAVObjects/flightplancontrol.c
flight/OpenPilot/UAVObjects/flightplansettings.c
flight/OpenPilot/UAVObjects/flightplanstatus.c
flight/OpenPilot/UAVObjects/flighttelemetrystats.c
flight/OpenPilot/UAVObjects/gcstelemetrystats.c
flight/OpenPilot/UAVObjects/gpsposition.c
flight/OpenPilot/UAVObjects/gpssatellites.c
flight/OpenPilot/UAVObjects/gpstime.c
flight/OpenPilot/UAVObjects/guidancesettings.c
flight/OpenPilot/UAVObjects/homelocation.c
flight/OpenPilot/UAVObjects/i2cstats.c
flight/OpenPilot/UAVObjects/inc/actuatorcommand.h
flight/OpenPilot/UAVObjects/inc/actuatordesired.h
flight/OpenPilot/UAVObjects/inc/actuatorsettings.h
flight/OpenPilot/UAVObjects/inc/ahrscalibration.h
flight/OpenPilot/UAVObjects/inc/ahrssettings.h
flight/OpenPilot/UAVObjects/inc/ahrsstatus.h
flight/OpenPilot/UAVObjects/inc/attitudeactual.h
flight/OpenPilot/UAVObjects/inc/attitudedesired.h
flight/OpenPilot/UAVObjects/inc/attituderaw.h
flight/OpenPilot/UAVObjects/inc/baroaltitude.h
flight/OpenPilot/UAVObjects/inc/batterysettings.h
flight/OpenPilot/UAVObjects/inc/firmwareiapobj.h
flight/OpenPilot/UAVObjects/inc/flightbatterystate.h
flight/OpenPilot/UAVObjects/inc/flightplancontrol.h
flight/OpenPilot/UAVObjects/inc/flightplansettings.h
flight/OpenPilot/UAVObjects/inc/flightplanstatus.h
flight/OpenPilot/UAVObjects/inc/flighttelemetrystats.h
flight/OpenPilot/UAVObjects/inc/gcstelemetrystats.h
flight/OpenPilot/UAVObjects/inc/gpsposition.h
flight/OpenPilot/UAVObjects/inc/gpssatellites.h
flight/OpenPilot/UAVObjects/inc/gpstime.h
flight/OpenPilot/UAVObjects/inc/guidancesettings.h
flight/OpenPilot/UAVObjects/inc/homelocation.h
flight/OpenPilot/UAVObjects/inc/i2cstats.h
flight/OpenPilot/UAVObjects/inc/manualcontrolcommand.h
flight/OpenPilot/UAVObjects/inc/manualcontrolsettings.h
flight/OpenPilot/UAVObjects/inc/mixersettings.h
flight/OpenPilot/UAVObjects/inc/mixerstatus.h
flight/OpenPilot/UAVObjects/inc/objectpersistence.h
flight/OpenPilot/UAVObjects/inc/pipxtrememodemsettings.h
flight/OpenPilot/UAVObjects/inc/pipxtrememodemstatus.h
flight/OpenPilot/UAVObjects/inc/positionactual.h
flight/OpenPilot/UAVObjects/inc/positiondesired.h
flight/OpenPilot/UAVObjects/inc/ratedesired.h
flight/OpenPilot/UAVObjects/inc/stabilizationsettings.h
flight/OpenPilot/UAVObjects/inc/systemalarms.h
flight/OpenPilot/UAVObjects/inc/systemsettings.h
flight/OpenPilot/UAVObjects/inc/systemstats.h
flight/OpenPilot/UAVObjects/inc/taskinfo.h
flight/OpenPilot/UAVObjects/inc/telemetrysettings.h
flight/OpenPilot/UAVObjects/inc/velocityactual.h
flight/OpenPilot/UAVObjects/inc/velocitydesired.h
flight/OpenPilot/UAVObjects/inc/watchdogstatus.h
flight/OpenPilot/UAVObjects/manualcontrolcommand.c
flight/OpenPilot/UAVObjects/manualcontrolsettings.c
flight/OpenPilot/UAVObjects/mixersettings.c
flight/OpenPilot/UAVObjects/mixerstatus.c
flight/OpenPilot/UAVObjects/objectpersistence.c
flight/OpenPilot/UAVObjects/pipxtrememodemsettings.c
flight/OpenPilot/UAVObjects/pipxtrememodemstatus.c
flight/OpenPilot/UAVObjects/positionactual.c
flight/OpenPilot/UAVObjects/positiondesired.c
flight/OpenPilot/UAVObjects/ratedesired.c
flight/OpenPilot/UAVObjects/stabilizationsettings.c
flight/OpenPilot/UAVObjects/systemalarms.c
flight/OpenPilot/UAVObjects/systemsettings.c
flight/OpenPilot/UAVObjects/systemstats.c
flight/OpenPilot/UAVObjects/taskinfo.c
flight/OpenPilot/UAVObjects/telemetrysettings.c
flight/OpenPilot/UAVObjects/velocityactual.c
flight/OpenPilot/UAVObjects/velocitydesired.c
flight/OpenPilot/UAVObjects/watchdogstatus.c
flight/UAVObjects/actuatorcommand.c
flight/UAVObjects/actuatordesired.c
flight/UAVObjects/actuatorsettings.c
flight/UAVObjects/ahrscalibration.c
flight/UAVObjects/ahrssettings.c
flight/UAVObjects/ahrsstatus.c
flight/UAVObjects/attitudeactual.c
flight/UAVObjects/attitudedesired.c
flight/UAVObjects/attituderaw.c
flight/UAVObjects/baroaltitude.c
flight/UAVObjects/batterysettings.c
flight/UAVObjects/firmwareiapobj.c
flight/UAVObjects/flightbatterystate.c
flight/UAVObjects/flightplancontrol.c
flight/UAVObjects/flightplansettings.c
flight/UAVObjects/flightplanstatus.c
flight/UAVObjects/flighttelemetrystats.c
flight/UAVObjects/gcstelemetrystats.c
flight/UAVObjects/gpsposition.c
flight/UAVObjects/gpssatellites.c
flight/UAVObjects/gpstime.c
flight/UAVObjects/guidancesettings.c
flight/UAVObjects/homelocation.c
flight/UAVObjects/i2cstats.c
flight/UAVObjects/inc/actuatorcommand.h
flight/UAVObjects/inc/actuatordesired.h
flight//UAVObjects/inc/actuatorsettings.h
flight/UAVObjects/inc/ahrscalibration.h
flight/UAVObjects/inc/ahrssettings.h
flight/UAVObjects/inc/ahrsstatus.h
flight/UAVObjects/inc/attitudeactual.h
flight/UAVObjects/inc/attitudedesired.h
flight/UAVObjects/inc/attituderaw.h
flight/UAVObjects/inc/baroaltitude.h
flight/UAVObjects/inc/batterysettings.h
flight/UAVObjects/inc/firmwareiapobj.h
flight/UAVObjects/inc/flightbatterystate.h
flight/UAVObjects/inc/flightplancontrol.h
flight/UAVObjects/inc/flightplansettings.h
flight/UAVObjects/inc/flightplanstatus.h
flight/UAVObjects/inc/flighttelemetrystats.h
flight/UAVObjects/inc/gcstelemetrystats.h
flight/UAVObjects/inc/gpsposition.h
flight/UAVObjects/inc/gpssatellites.h
flight/UAVObjects/inc/gpstime.h
flight/UAVObjects/inc/guidancesettings.h
flight/UAVObjects/inc/homelocation.h
flight/UAVObjects/inc/i2cstats.h
flight/UAVObjects/inc/manualcontrolcommand.h
flight/UAVObjects/inc/manualcontrolsettings.h
flight/UAVObjects/inc/mixersettings.h
flight/UAVObjects/inc/mixerstatus.h
flight/UAVObjects/inc/objectpersistence.h
flight/UAVObjects/inc/pipxtrememodemsettings.h
flight/UAVObjects/inc/pipxtrememodemstatus.h
flight/UAVObjects/inc/positionactual.h
flight/UAVObjects/inc/positiondesired.h
flight/UAVObjects/inc/ratedesired.h
flight/UAVObjects/inc/stabilizationsettings.h
flight/UAVObjects/inc/systemalarms.h
flight/UAVObjects/inc/systemsettings.h
flight/UAVObjects/inc/systemstats.h
flight/UAVObjects/inc/taskinfo.h
flight/UAVObjects/inc/telemetrysettings.h
flight/UAVObjects/inc/velocityactual.h
flight/UAVObjects/inc/velocitydesired.h
flight/UAVObjects/inc/watchdogstatus.h
flight/UAVObjects/manualcontrolcommand.c
flight/UAVObjects/manualcontrolsettings.c
flight/UAVObjects/mixersettings.c
flight/UAVObjects/mixerstatus.c
flight/UAVObjects/objectpersistence.c
flight/UAVObjects/pipxtrememodemsettings.c
flight/UAVObjects/pipxtrememodemstatus.c
flight/UAVObjects/positionactual.c
flight/UAVObjects/positiondesired.c
flight/UAVObjects/ratedesired.c
flight/UAVObjects/stabilizationsettings.c
flight/UAVObjects/systemalarms.c
flight/UAVObjects/systemsettings.c
flight/UAVObjects/systemstats.c
flight/UAVObjects/taskinfo.c
flight/UAVObjects/telemetrysettings.c
flight/UAVObjects/velocityactual.c
flight/UAVObjects/velocitydesired.c
flight/UAVObjects/watchdogstatus.c
flight/OpenPilot/UAVObjects/uavobjectsinit.c
flight/UAVObjects/uavobjectsinit.c
ground/src/plugins/uavobjects/actuatorcommand.cpp
ground/src/plugins/uavobjects/actuatordesired.cpp
@ -246,3 +246,9 @@ ground/src/plugins/uavobjects/telemetrysettings.py
ground/src/plugins/uavobjects/velocityactual.py
ground/src/plugins/uavobjects/velocitydesired.py
ground/src/plugins/uavobjects/watchdogstatus.py
openpilotgcs-build-desktop
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/*.mode1v3
flight/Project/OpenPilotOSX/OpenPilotOSX.xcodeproj/*.pbxuser
ground/openpilotgcs.pro.user

View File

@ -245,6 +245,13 @@ ahrs_%:
mkdir -p $(BUILD_DIR)/ahrs
$(MAKE) OUTDIR="$(BUILD_DIR)/ahrs" TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" REMOVE_CMD="$(RM)" OOCD_EXE="$(OPENOCD)" -C $(ROOT_DIR)/flight/AHRS $*
.PHONY: coptercontrol
coptercontrol: coptercontrol_elf
coptercontrol_%: uavobjects
mkdir -p $(BUILD_DIR)/coptercontrol
$(MAKE) OUTDIR="$(BUILD_DIR)/coptercontrol" TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" REMOVE_CMD="$(RM)" OOCD_EXE="$(OPENOCD)" -C $(ROOT_DIR)/flight/CopterControl $*
.PHONY: sim_posix
sim_posix: sim_posix_elf

View File

@ -57,7 +57,7 @@ FLASH_TOOL = OPENOCD
USE_THUMB_MODE = YES
# List of modules to include
MODULES = Actuator Telemetry GPS ManualControl Altitude AHRSComms Stabilization Guidance FirmwareIAP
MODULES = Actuator Telemetry ManualControl Stabilization FirmwareIAP
#MODULES = Telemetry Example
#MODULES = Telemetry MK/MKSerial
@ -71,7 +71,7 @@ MODULES = Actuator Telemetry GPS ManualControl Altitude AHRSComms Stabilization
# - BOARD just passed as define (optional)
MCU = cortex-m3
CHIP = STM32F103RET
BOARD = STM3210E_OP
BOARD = STM3210E_CC_Rev1
MODEL = HD
ifeq ($(USE_BOOTLOADER), YES)
BOOT_MODEL = $(MODEL)_BL
@ -84,19 +84,19 @@ endif
OUTDIR = Build
# Target file name (without extension).
TARGET = OpenPilot
TARGET = CopterControl
# Paths
OPSYSTEM = ./System
OPSYSTEMINC = $(OPSYSTEM)/inc
OPUAVTALK = ./UAVTalk
OPUAVTALK = ../UAVTalk
OPUAVTALKINC = $(OPUAVTALK)/inc
OPUAVOBJ = ./UAVObjects
OPUAVOBJ = ../UAVObjects
OPUAVOBJINC = $(OPUAVOBJ)/inc
OPTESTS = ./Tests
OPMODULEDIR = ./Modules
OPMODULEDIR = ../Modules
FLIGHTLIB = ../Libraries
FLIGHTLIBINC = ../Libraries/inc
FLIGHTLIBINC = $(FLIGHTLIB)/inc
PIOS = ../PiOS
PIOSINC = $(PIOS)/inc
PIOSSTM32F10X = $(PIOS)/STM32F10x
@ -289,8 +289,8 @@ SRC += $(RTOSSRCDIR)/portable/GCC/ARM_CM3/port.c
SRC += $(RTOSSRCDIR)/portable/MemMang/heap_2.c
## Dosfs file system
SRC += $(DOSFSDIR)/dosfs.c
SRC += $(DOSFSDIR)/dfs_sdcard.c
#SRC += $(DOSFSDIR)/dosfs.c
#SRC += $(DOSFSDIR)/dfs_sdcard.c
## AHRS boot loader comms
SRC += $(AHRSBOOTLOADER)/ahrs_spi_program_master.c
@ -363,7 +363,7 @@ EXTRAINCDIRS += $(RTOSSRCDIR)/portable/GCC/ARM_CM3
EXTRAINCDIRS += $(AHRSBOOTLOADERINC)
EXTRAINCDIRS += $(PYMITEINC)
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, Modules/${MOD}/inc} ${OPMODULEDIR}/System/inc
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, ${OPMODULEDIR}/${MOD}/inc} ${OPMODULEDIR}/System/inc
# List any extra directories to look for library files here.

View File

@ -94,10 +94,8 @@ int main()
/* If all is well we will never reach here as the scheduler will now be running. */
/* If we do get here, it will most likely be because we ran out of heap space. */
PIOS_LED_Off(LED1);
PIOS_LED_Off(LED2);
for(;;) {
PIOS_LED_Toggle(LED1);
PIOS_LED_Toggle(LED2);
PIOS_DELAY_WaitmS(100);
}
@ -339,5 +337,5 @@ static void TaskSDCard(void *pvParameters)
/**
* @}
* @}
*/
*/

View File

@ -48,9 +48,6 @@ void PIOS_Board_Init(void) {
/* SPI Init */
PIOS_SPI_Init();
/* Enable and mount the SDCard */
PIOS_SDCARD_Init();
PIOS_SDCARD_MountFS(0);
#if defined(PIOS_INCLUDE_SPEKTRUM)
/* SPEKTRUM init must come before comms */
PIOS_SPEKTRUM_Init();

View File

@ -128,11 +128,13 @@ static void systemTask(void *parameters)
PIOS_LED_Toggle(LED1);
// Turn on the error LED if an alarm is set
#if (PIOS_LED_NUM > 1)
if (AlarmsHasWarnings()) {
PIOS_LED_On(LED2);
} else {
PIOS_LED_Off(LED2);
}
#endif
ManualControlCommandData manualControlCommandData;
ManualControlCommandGet(&manualControlCommandData);
@ -307,7 +309,7 @@ static void updateSystemAlarms()
}
// Check for SD card
if (POIS_SDCARD_IsMounted() == 0) {
if (PIOS_SDCARD_IsMounted() == 0) {
AlarmsSet(SYSTEMALARMS_ALARM_SDCARD, SYSTEMALARMS_ALARM_WARNING);
} else {
AlarmsClear(SYSTEMALARMS_ALARM_SDCARD);

View File

@ -72,7 +72,7 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
#define FUNC_ID 1
#define HW_VERSION 01
#define BOOTLOADER_VERSION 0
#define MEM_SIZE 524288 //512K
#define MEM_SIZE 131072 //128K
#define SIZE_OF_DESCRIPTION (uint8_t) 100
#define START_OF_USER_CODE (uint32_t)0x08005000//REMEMBER SET ALSO IN link_stm32f10x_HD_BL.ld
#define SIZE_OF_CODE (uint32_t) (MEM_SIZE-(START_OF_USER_CODE-0x08000000)-SIZE_OF_DESCRIPTION)
@ -89,7 +89,7 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
//------------------------
// WATCHDOG_SETTINGS
//------------------------
#define PIOS_WATCHDOG_TIMEOUT 250
#define PIOS_WATCHDOG_TIMEOUT 250
#define PIOS_WDG_REGISTER BKP_DR4
#define PIOS_WDG_ACTUATOR 0x0001
#define PIOS_WDG_STABILIZATION 0x0002
@ -99,16 +99,13 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
//------------------------
// PIOS_LED
//------------------------
#define PIOS_LED_LED1_GPIO_PORT GPIOC
#define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_12
#define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOC
#define PIOS_LED_LED2_GPIO_PORT GPIOC
#define PIOS_LED_LED2_GPIO_PIN GPIO_Pin_13
#define PIOS_LED_LED2_GPIO_CLK RCC_APB2Periph_GPIOC
#define PIOS_LED_NUM 2
#define PIOS_LED_PORTS { PIOS_LED_LED1_GPIO_PORT, PIOS_LED_LED2_GPIO_PORT }
#define PIOS_LED_PINS { PIOS_LED_LED1_GPIO_PIN, PIOS_LED_LED2_GPIO_PIN }
#define PIOS_LED_CLKS { PIOS_LED_LED1_GPIO_CLK, PIOS_LED_LED2_GPIO_CLK }
#define PIOS_LED_LED1_GPIO_PORT GPIOA
#define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_6
#define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOA
#define PIOS_LED_NUM 1
#define PIOS_LED_PORTS { PIOS_LED_LED1_GPIO_PORT }
#define PIOS_LED_PINS { PIOS_LED_LED1_GPIO_PIN }
#define PIOS_LED_CLKS { PIOS_LED_LED1_GPIO_CLK }
//------------------------
// PIOS_I2C
@ -398,17 +395,17 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
* glue macros for file IO
* STM32 uses DOSFS for file IO
*/
#define PIOS_FOPEN_READ(filename,file) DFS_OpenFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, DFS_READ, PIOS_SDCARD_Sector, &file) != DFS_OK
#define PIOS_FOPEN_READ(filename,file) 0 /* DFS_OpenFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, DFS_READ, PIOS_SDCARD_Sector, &file) != DFS_OK */
#define PIOS_FOPEN_WRITE(filename,file) DFS_OpenFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, DFS_WRITE, PIOS_SDCARD_Sector, &file) != DFS_OK
#define PIOS_FOPEN_WRITE(filename,file) 0 /* DFS_OpenFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, DFS_WRITE, PIOS_SDCARD_Sector, &file) != DFS_OK */
#define PIOS_FREAD(file,bufferadr,length,resultadr) DFS_ReadFile(file, PIOS_SDCARD_Sector, (uint8_t*)bufferadr, resultadr, length) != DFS_OK
#define PIOS_FREAD(file,bufferadr,length,resultadr) 0 /* DFS_ReadFile(file, PIOS_SDCARD_Sector, (uint8_t*)bufferadr, resultadr, length) != DFS_OK */
#define PIOS_FWRITE(file,bufferadr,length,resultadr) DFS_WriteFile(file, PIOS_SDCARD_Sector, (uint8_t*)bufferadr, resultadr, length)
#define PIOS_FWRITE(file,bufferadr,length,resultadr) 0 /* DFS_WriteFile(file, PIOS_SDCARD_Sector, (uint8_t*)bufferadr, resultadr, length) */
#define PIOS_FCLOSE(file) DFS_Close(&file)
#define PIOS_FCLOSE(file) 0 /* DFS_Close(&file) */
#define PIOS_FUNLINK(filename) DFS_UnlinkFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, PIOS_SDCARD_Sector)
#define PIOS_FUNLINK(filename) 0 /* DFS_UnlinkFile(&PIOS_SDCARD_VolInfo, (uint8_t *)filename, PIOS_SDCARD_Sector) */

View File

@ -1,12 +1,14 @@
#ifndef PIOS_BOARD_H_
#define PIOS_BOARD_H_
#ifdef USE_STM32103CB_AHRS
#include "STM32103CB_AHRS.h"
#elif USE_STM3210E_OP
#include "STM3210E_OP.h"
#elif USE_STM32103CB_PIPXTREME
#include "STM32103CB_PIPXTREME_Rev1.h"
#endif
#endif /* PIOS_BOARD_H_ */
#ifndef PIOS_BOARD_H_
#define PIOS_BOARD_H_
#ifdef USE_STM32103CB_AHRS
#include "STM32103CB_AHRS.h"
#elif USE_STM3210E_OP
#include "STM3210E_OP.h"
#elif USE_STM32103CB_PIPXTREME
#include "STM32103CB_PIPXTREME_Rev1.h"
#elif USE_STM3210E_CC_Rev1
#include "STM3210E_CC_Rev1.h"
#endif
#endif /* PIOS_BOARD_H_ */

View File

@ -804,7 +804,7 @@ int32_t PIOS_SDCARD_StartupLog(void)
* @return 0 if no
* @return 1 if yes
*/
int32_t POIS_SDCARD_IsMounted()
int32_t PIOS_SDCARD_IsMounted()
{
return sdcard_mounted;
}

View File

@ -103,7 +103,7 @@ extern int32_t PIOS_SDCARD_CIDRead(SDCARDCidTypeDef * cid);
extern int32_t PIOS_SDCARD_CSDRead(SDCARDCsdTypeDef * csd);
extern int32_t PIOS_SDCARD_StartupLog(void);
extern int32_t POIS_SDCARD_IsMounted();
extern int32_t PIOS_SDCARD_IsMounted();
extern int32_t PIOS_SDCARD_MountFS(uint32_t StartupLog);
extern int32_t PIOS_SDCARD_GetFree(void);

View File

@ -0,0 +1,47 @@
/**
******************************************************************************
*
* @file eventdispatcher.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Include files of the uavobjectlist library
* @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 EVENTDISPATCHER_H
#define EVENTDISPATCHER_H
// Public types
/**
* Event dispatcher statistics
*/
typedef struct {
uint32_t eventErrors;
} EventStats;
// Public functions
int32_t EventDispatcherInitialize();
void EventGetStats(EventStats* statsOut);
void EventClearStats();
int32_t EventCallbackDispatch(UAVObjEvent* ev, UAVObjEventCallback cb);
int32_t EventPeriodicCallbackCreate(UAVObjEvent* ev, UAVObjEventCallback cb, int32_t periodMs);
int32_t EventPeriodicCallbackUpdate(UAVObjEvent* ev, UAVObjEventCallback cb, int32_t periodMs);
int32_t EventPeriodicQueueCreate(UAVObjEvent* ev, xQueueHandle queue, int32_t periodMs);
int32_t EventPeriodicQueueUpdate(UAVObjEvent* ev, xQueueHandle queue, int32_t periodMs);
#endif // EVENTDISPATCHER_H

View File

@ -516,7 +516,7 @@ int32_t UAVObjSaveToFile(UAVObjHandle obj, uint16_t instId, FILEINFO* file)
ObjectInstList* instEntry;
// Check for file system availability
if ( POIS_SDCARD_IsMounted() == 0 )
if ( PIOS_SDCARD_IsMounted() == 0 )
{
return -1;
}
@ -574,7 +574,7 @@ int32_t UAVObjSave(UAVObjHandle obj, uint16_t instId)
uint8_t filename[14];
// Check for file system availability
if ( POIS_SDCARD_IsMounted() == 0 )
if ( PIOS_SDCARD_IsMounted() == 0 )
{
return -1;
}
@ -624,7 +624,7 @@ UAVObjHandle UAVObjLoadFromFile(FILEINFO* file)
UAVObjHandle obj;
// Check for file system availability
if ( POIS_SDCARD_IsMounted() == 0 )
if ( PIOS_SDCARD_IsMounted() == 0 )
{
return NULL;
}
@ -706,7 +706,7 @@ int32_t UAVObjLoad(UAVObjHandle obj, uint16_t instId)
uint8_t filename[14];
// Check for file system availability
if ( POIS_SDCARD_IsMounted() == 0 )
if ( PIOS_SDCARD_IsMounted() == 0 )
{
return -1;
}
@ -763,7 +763,7 @@ int32_t UAVObjDelete(UAVObjHandle obj, uint16_t instId)
uint8_t filename[14];
// Check for file system availability
if ( POIS_SDCARD_IsMounted() == 0 )
if ( PIOS_SDCARD_IsMounted() == 0 )
{
return -1;
}

View File

@ -34,7 +34,7 @@ bool UAVObjectGeneratorFlight::generate(UAVObjectParser* parser,QString basepath
<<"uint16_t" << "uint32_t" << "float" << "uint8_t";
QString flightObjInit,objInc;
flightCodePath = QDir( basepath + QString("flight/OpenPilot/UAVObjects"));
flightCodePath = QDir( basepath + QString("flight/UAVObjects"));
flightCodeTemplate = readFile( flightCodePath.absoluteFilePath("uavobjecttemplate.c") );
flightIncludeTemplate = readFile( flightCodePath.absoluteFilePath("inc/uavobjecttemplate.h") );

View File

@ -45,7 +45,7 @@ public:
typedef struct {
quint16 Command;
quint8 Description[100];
quint8 HWVersion;
quint16 HWVersion;
quint8 Target;
quint8 ArmReset;
quint32 crc;
@ -64,7 +64,7 @@ public:
// Constants
static const quint32 OBJID = 879185696U;
static const quint32 OBJID = 3083476468U;
static const QString NAME;
static const QString DESCRIPTION;
static const bool ISSINGLEINST = 1;