mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 19:47:50 +08:00
*** empty log message ***
This commit is contained in:
+5
-2
@@ -45,8 +45,11 @@ $(RADIO_H) : $(CONF)/$(RADIO) $(CONF_XML)
|
|||||||
mv /tmp/radio.h $@
|
mv /tmp/radio.h $@
|
||||||
|
|
||||||
$(CONTROL_H) : $(CONF)/$(AIRFRAME) $(CONF_XML)
|
$(CONTROL_H) : $(CONF)/$(AIRFRAME) $(CONF_XML)
|
||||||
$(TOOLS)/gen_control.out $< > /tmp/control.h
|
TMPFILE=$(shell echo `tempfile`)
|
||||||
mv /tmp/control.h $@
|
$(TOOLS)/gen_control.out $< > $TMPFILE
|
||||||
|
mv $TMPFILE $@
|
||||||
|
# $(TOOLS)/gen_control.out $< > /tmp/control.h
|
||||||
|
# mv /tmp/control.h $@
|
||||||
|
|
||||||
$(FLIGHT_PLAN_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML)
|
$(FLIGHT_PLAN_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML)
|
||||||
$(TOOLS)/gen_flight_plan.out $< > /tmp/fp.h
|
$(TOOLS)/gen_flight_plan.out $< > /tmp/fp.h
|
||||||
|
|||||||
@@ -77,5 +77,7 @@
|
|||||||
</control>
|
</control>
|
||||||
<makefile>
|
<makefile>
|
||||||
include $(PAPARAZZI_SRC)/conf/autopilot/disc_board.makefile
|
include $(PAPARAZZI_SRC)/conf/autopilot/disc_board.makefile
|
||||||
|
ap.CFLAGS += -DRADIO_CONTROL -DACTUATORS
|
||||||
|
ap.EXTRA_SRCS += radio_control.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/esc.c
|
||||||
</makefile>
|
</makefile>
|
||||||
</airframe>
|
</airframe>
|
||||||
@@ -33,12 +33,14 @@
|
|||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
#include "std.h"
|
||||||
|
#include "airframe.h"
|
||||||
|
|
||||||
#define MAX_TICK 0x3FF
|
#define MAX_TICK 0x3FF
|
||||||
#define MOT_CTL_0 OCR3C
|
#define MOT_CTL_0 OCR3C
|
||||||
#define MOT_CTL_1 OCR1A
|
#define MOT_CTL_1 OCR1A
|
||||||
#define MOT_CTL_2 OCR3B
|
#define MOT_CTL_2 OCR3B
|
||||||
#define MOT_CTL_3 OCR3A
|
#define MOT_CTL_3 OCR3A
|
||||||
|
|
||||||
void command_init ( void ) {
|
void command_init ( void ) {
|
||||||
/* OC1A output */
|
/* OC1A output */
|
||||||
@@ -56,7 +58,8 @@ void command_init ( void ) {
|
|||||||
#define COMMAND_(i) MOT_CTL_ ## i
|
#define COMMAND_(i) MOT_CTL_ ## i
|
||||||
#define COMMAND(i) COMMAND_(i)
|
#define COMMAND(i) COMMAND_(i)
|
||||||
#define ChopServo(x) (x > MAX_TICK ? MAX_TICK : x)
|
#define ChopServo(x) (x > MAX_TICK ? MAX_TICK : x)
|
||||||
|
#define SERVOS_TICS_OF_USEC(s) (s)
|
||||||
|
|
||||||
void command_set(const pprz_t values[]) {
|
void command_set(const pprz_t values[]) {
|
||||||
CommandSet(values); /*Generated from airframe.xml */
|
CommandsSet(values); /*Generated from airframe.xml */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "ppm.h"
|
#include "ppm.h"
|
||||||
#include "radio_control.h"
|
#include "radio_control.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "control_2.h"
|
//#include "control_2.h"
|
||||||
|
|
||||||
void init_fbw( void ) {
|
void init_fbw( void ) {
|
||||||
low_level_init();
|
low_level_init();
|
||||||
@@ -37,8 +37,11 @@ void periodic_task_fbw( void ) {
|
|||||||
|
|
||||||
void event_task_fbw( void ) {
|
void event_task_fbw( void ) {
|
||||||
#ifdef RADIO_CONTROL
|
#ifdef RADIO_CONTROL
|
||||||
if (radio_control_ppm_event())
|
if (radio_control_ppm_event()) {
|
||||||
|
#ifdef CONTROL
|
||||||
control_process_radio_control();
|
control_process_radio_control();
|
||||||
|
#endif /* CONTROL */
|
||||||
|
}
|
||||||
#endif /* RADIO_CONTROL */
|
#endif /* RADIO_CONTROL */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user