mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Fix UAVObject stuff for win32 sim, and fix pios_servo as well.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2675 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
8c5fe506b3
commit
23db2e9601
@ -110,6 +110,7 @@ PYMITEINC += $(PYMITEPLAT)
|
|||||||
PYMITEINC += $(OUTDIR)
|
PYMITEINC += $(OUTDIR)
|
||||||
FLIGHTPLANLIB = $(OPMODULEDIR)/FlightPlan/lib
|
FLIGHTPLANLIB = $(OPMODULEDIR)/FlightPlan/lib
|
||||||
FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans
|
FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans
|
||||||
|
OPUAVSYNTHDIR = $(OUTDIR)/../../uavobject-synthetics/flight
|
||||||
|
|
||||||
# List C source files here. (C dependencies are automatically generated.)
|
# List C source files here. (C dependencies are automatically generated.)
|
||||||
# use file-extension c for "c-only"-files
|
# use file-extension c for "c-only"-files
|
||||||
@ -137,9 +138,10 @@ SRC += $(OPSYSTEM)/alarms.c
|
|||||||
SRC += $(OPSYSTEM)/taskmonitor.c
|
SRC += $(OPSYSTEM)/taskmonitor.c
|
||||||
SRC += $(OPUAVTALK)/uavtalk.c
|
SRC += $(OPUAVTALK)/uavtalk.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
||||||
SRC += $(OPUAVOBJ)/uavobjectsinit.c
|
SRC += $(OPUAVSYNTHDIR)/init/uavobjectsinit.c
|
||||||
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
||||||
SRC += $(FLIGHTLIB)/CoordinateConversions.c
|
SRC += $(FLIGHTLIB)/CoordinateConversions.c
|
||||||
|
|
||||||
else
|
else
|
||||||
## TESTCODE
|
## TESTCODE
|
||||||
SRC += $(OPTESTS)/test_common.c
|
SRC += $(OPTESTS)/test_common.c
|
||||||
@ -149,48 +151,7 @@ endif
|
|||||||
|
|
||||||
## UAVOBJECTS
|
## UAVOBJECTS
|
||||||
ifndef TESTAPP
|
ifndef TESTAPP
|
||||||
SRC += $(OPUAVOBJ)/objectpersistence.c
|
SRC += $(wildcard $(OPUAVSYNTHDIR)/*.c)
|
||||||
SRC += $(OPUAVOBJ)/positionactual.c
|
|
||||||
SRC += $(OPUAVOBJ)/gpsposition.c
|
|
||||||
SRC += $(OPUAVOBJ)/gpstime.c
|
|
||||||
SRC += $(OPUAVOBJ)/gpssatellites.c
|
|
||||||
SRC += $(OPUAVOBJ)/gcstelemetrystats.c
|
|
||||||
SRC += $(OPUAVOBJ)/flighttelemetrystats.c
|
|
||||||
SRC += $(OPUAVOBJ)/systemstats.c
|
|
||||||
SRC += $(OPUAVOBJ)/systemalarms.c
|
|
||||||
SRC += $(OPUAVOBJ)/systemsettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/telemetrysettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/actuatorcommand.c
|
|
||||||
SRC += $(OPUAVOBJ)/actuatordesired.c
|
|
||||||
SRC += $(OPUAVOBJ)/actuatorsettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/manualcontrolcommand.c
|
|
||||||
SRC += $(OPUAVOBJ)/manualcontrolsettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/attitudedesired.c
|
|
||||||
SRC += $(OPUAVOBJ)/stabilizationsettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/ahrsstatus.c
|
|
||||||
SRC += $(OPUAVOBJ)/i2cstats.c
|
|
||||||
SRC += $(OPUAVOBJ)/baroaltitude.c
|
|
||||||
SRC += $(OPUAVOBJ)/ahrscalibration.c
|
|
||||||
SRC += $(OPUAVOBJ)/attitudeactual.c
|
|
||||||
SRC += $(OPUAVOBJ)/ahrssettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/flightbatterystate.c
|
|
||||||
SRC += $(OPUAVOBJ)/attituderaw.c
|
|
||||||
SRC += $(OPUAVOBJ)/homelocation.c
|
|
||||||
SRC += $(OPUAVOBJ)/mixersettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/mixerstatus.c
|
|
||||||
SRC += $(OPUAVOBJ)/positiondesired.c
|
|
||||||
SRC += $(OPUAVOBJ)/velocitydesired.c
|
|
||||||
SRC += $(OPUAVOBJ)/velocityactual.c
|
|
||||||
SRC += $(OPUAVOBJ)/guidancesettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/firmwareiapobj.c
|
|
||||||
SRC += $(OPUAVOBJ)/ratedesired.c
|
|
||||||
SRC += $(OPUAVOBJ)/batterysettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/flightplancontrol.c
|
|
||||||
SRC += $(OPUAVOBJ)/flightplanstatus.c
|
|
||||||
SRC += $(OPUAVOBJ)/flightplansettings.c
|
|
||||||
SRC += $(OPUAVOBJ)/taskinfo.c
|
|
||||||
SRC += $(OPUAVOBJ)/watchdogstatus.c
|
|
||||||
SRC += $(OPUAVOBJ)/nedaccel.c
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## PIOS Hardware (win32)
|
## PIOS Hardware (win32)
|
||||||
@ -246,6 +207,7 @@ EXTRAINCDIRS += $(RTOSSRCDIR)/portable/GCC/Win32
|
|||||||
EXTRAINCDIRS += $(FLIGHTLIB)
|
EXTRAINCDIRS += $(FLIGHTLIB)
|
||||||
EXTRAINCDIRS += $(FLIGHTLIBINC)
|
EXTRAINCDIRS += $(FLIGHTLIBINC)
|
||||||
EXTRAINCDIRS += $(PYMITEINC)
|
EXTRAINCDIRS += $(PYMITEINC)
|
||||||
|
EXTRAINCDIRS += $(OPUAVSYNTHDIR)
|
||||||
|
|
||||||
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, ${OPMODULEDIR}/${MOD}/inc} ${OPMODULEDIR}/System/inc
|
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, ${OPMODULEDIR}/${MOD}/inc} ${OPMODULEDIR}/System/inc
|
||||||
|
|
||||||
|
48
flight/PiOS.win32/inc/pios_initcall.h
Normal file
48
flight/PiOS.win32/inc/pios_initcall.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/**
|
||||||
|
******************************************************************************
|
||||||
|
* @addtogroup PIOS PIOS Initcall infrastructure
|
||||||
|
* @{
|
||||||
|
* @addtogroup PIOS_INITCALL Generic Initcall Macros
|
||||||
|
* @brief Initcall Macros
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file pios_initcall.h
|
||||||
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
|
||||||
|
* @brief Initcall header
|
||||||
|
* @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 PIOS_INITCALL_H
|
||||||
|
#define PIOS_INITCALL_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Just a stub define to make things compile.
|
||||||
|
* Automatically link based initialization currently doesn't work
|
||||||
|
* since posix really runs on a multitude of architectures
|
||||||
|
* and we cannot define a linker script for each of them atm
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define uavobj_initcall(fn)
|
||||||
|
|
||||||
|
#endif /* PIOS_INITCALL_H */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
* @}
|
||||||
|
*/
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
/* Public Functions */
|
/* Public Functions */
|
||||||
extern void PIOS_Servo_Init(void);
|
extern void PIOS_Servo_Init(void);
|
||||||
extern void PIOS_Servo_SetHz(uint16_t onetofour, uint16_t fivetoeight);
|
extern void PIOS_Servo_SetHz(uint16_t * speeds, uint8_t num_banks);
|
||||||
extern void PIOS_Servo_Set(uint8_t Servo, uint16_t Position);
|
extern void PIOS_Servo_Set(uint8_t Servo, uint16_t Position);
|
||||||
|
|
||||||
#endif /* PIOS_SERVO_H */
|
#endif /* PIOS_SERVO_H */
|
||||||
|
@ -48,6 +48,9 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/* Generic initcall infrastructure */
|
||||||
|
#include "pios_initcall.h"
|
||||||
|
|
||||||
/* PIOS Board Specific Device Configuration */
|
/* PIOS Board Specific Device Configuration */
|
||||||
#include "pios_board_posix.h"
|
#include "pios_board_posix.h"
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ void PIOS_Servo_Init(void)
|
|||||||
* \param[in] onetofour Rate for outputs 1 to 4 (Hz)
|
* \param[in] onetofour Rate for outputs 1 to 4 (Hz)
|
||||||
* \param[in] fivetoeight Rate for outputs 5 to 8 (Hz)
|
* \param[in] fivetoeight Rate for outputs 5 to 8 (Hz)
|
||||||
*/
|
*/
|
||||||
void PIOS_Servo_SetHz(uint16_t onetofour, uint16_t fivetoeight)
|
void PIOS_Servo_SetHz(uint16_t * banks, uint8_t num_banks)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ void PIOS_Servo_Set(uint8_t Servo, uint16_t Position)
|
|||||||
{
|
{
|
||||||
#ifndef PIOS_ENABLE_DEBUG_PINS
|
#ifndef PIOS_ENABLE_DEBUG_PINS
|
||||||
/* Make sure servo exists */
|
/* Make sure servo exists */
|
||||||
if (Servo < PIOS_SERVO_NUM_OUTPUTS && Servo >= 0) {
|
if (Servo < PIOS_SERVO_NUM_OUTPUTS) {
|
||||||
/* Update the position */
|
/* Update the position */
|
||||||
ServoPosition[Servo] = Position;
|
ServoPosition[Servo] = Position;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user