mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-08 02:15:53 +08:00
*** empty log message ***
This commit is contained in:
@@ -263,7 +263,5 @@ sim.CFLAGS += -DCONFIG=\"tiny.h\" -DAGR_CLIMB -DH_CTL_RATE_LOOP -DLOITER_TRIM -D
|
||||
sim.srcs += traffic_info.c
|
||||
# sim.srcs += bomb.c
|
||||
|
||||
|
||||
|
||||
</makefile>
|
||||
</airframe>
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<define name="ROLL_SCALE" value="0.44"/>
|
||||
</section>
|
||||
|
||||
<!-- cf section HORIZONTAL CONTROL
|
||||
<section name="PID">
|
||||
<define name="ROLL_PGAIN" value="5000."/>
|
||||
<define name="PITCH_OF_ROLL" value="0.0"/>
|
||||
@@ -97,6 +98,7 @@
|
||||
<define name="AILERON_OF_GAZ" value="0.0"/>
|
||||
<define name="CRUISE_THROTTLE" value="0.30"/>
|
||||
</section>
|
||||
-->
|
||||
|
||||
<section name="GYRO">
|
||||
<define name="GYRO_MAX_RATE" value="150."/>
|
||||
@@ -107,6 +109,7 @@
|
||||
<define name="ROLL_RATE_DGAIN" value="0.0"/>
|
||||
</section>
|
||||
|
||||
<!-- cf section VERTICAL CONTROL
|
||||
<section name="ALT" prefix="CLIMB_">
|
||||
<define name="PITCH_PGAIN" value="-0.1"/>
|
||||
<define name="PITCH_IGAIN" value="0.025"/>
|
||||
@@ -117,6 +120,7 @@
|
||||
<define name="GAZ_OF_CLIMB" value="0.2" unit="%/(m/s)"/>
|
||||
<define name="MAX_DIFF_GAZ" value="0.05" unit="%"/>
|
||||
</section>
|
||||
-->
|
||||
|
||||
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
||||
<define name="COURSE_PGAIN" value="-0.9"/>
|
||||
@@ -203,7 +207,7 @@
|
||||
|
||||
<section name="FAILSAFE" prefix="FAILSAFE_">
|
||||
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
|
||||
<define name="DEFAULT_THROTTLE" value="CRUISE_THROTTLE+0.05" unit="%"/>
|
||||
<define name="DEFAULT_THROTTLE" value="V_CTL_AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE+0.05" unit="%"/>
|
||||
<define name="DEFAULT_ROLL" value="0.17" unit="rad"/>
|
||||
<define name="DEFAULT_PITCH" value="0.08" unit="rad"/>
|
||||
<define name="HOME_RADIUS" value="50" unit="m"/>
|
||||
|
||||
@@ -10,10 +10,6 @@ ap.TARGETDIR = autopilot
|
||||
LPC21ISP_BAUD = 38400
|
||||
LPC21ISP_XTAL = 12000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# a test program to setup actuators
|
||||
setup_actuators.ARCHDIR = $(ARCHI)
|
||||
setup_actuators.ARCH = arm7tdmi
|
||||
@@ -31,4 +27,17 @@ tunnel.TARGET = tunnel
|
||||
tunnel.TARGETDIR = tunnel
|
||||
|
||||
tunnel.CFLAGS += -DFBW -DCONFIG=\"tiny.h\" -DLED -DTIME_LED=1
|
||||
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
|
||||
tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
|
||||
|
||||
|
||||
# A test program to monitor the ADC values
|
||||
test_adcs.ARCHDIR = $(ARCHI)
|
||||
test_adcs.ARCH = arm7tdmi
|
||||
test_adcs.TARGET = test_adcs
|
||||
test_adcs.TARGETDIR = test_adcs
|
||||
|
||||
test_adcs.CFLAGS += -DCONFIG=\"tiny_0_99.h\" -DLED -DTIME_LED=1 -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
|
||||
test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 -DDATALINK=XBEE -DUART0_BAUD=B9600
|
||||
test_adcs.srcs += downlink.c $(SRC_ARCH)/uart_hw.c xbee.c
|
||||
|
||||
test_adcs.srcs += sys_time.c $(SRC_ARCH)/adc_hw.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c test_adcs.c
|
||||
|
||||
@@ -93,8 +93,8 @@ extern uint8_t ck_a, ck_b;
|
||||
#define PprzTransportPutArray(_put, _n, _x) { \
|
||||
uint8_t i; \
|
||||
PprzTransportPutUint8(_n); \
|
||||
for(i = 0; i < _n; i++) { \
|
||||
_put(&_x[i]); \
|
||||
for(_i = 0; _i < _n; _i++) { \
|
||||
_put(&_x[_i]); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Basic program periodically sending the values of the 8 ADCs
|
||||
*/
|
||||
|
||||
|
||||
#include "interrupt_hw.h"
|
||||
#include "std.h"
|
||||
#include "init_hw.h"
|
||||
#include "sys_time.h"
|
||||
#include "adc.h"
|
||||
#include "messages.h"
|
||||
#include "led.h"
|
||||
#include "uart.h"
|
||||
#include "downlink.h"
|
||||
|
||||
|
||||
#define NB_ADC 8
|
||||
#define ADC_NB_SAMPLES 16
|
||||
|
||||
static struct adc_buf buf_adc[NB_ADC];
|
||||
|
||||
int main (int argc, char** argv) {
|
||||
hw_init();
|
||||
sys_time_init();
|
||||
led_init();
|
||||
adc_init();
|
||||
|
||||
adc_buf_channel(ADC_0, &buf_adc[0], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_1, &buf_adc[1], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_2, &buf_adc[2], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_3, &buf_adc[3], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_4, &buf_adc[4], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_5, &buf_adc[5], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_6, &buf_adc[6], ADC_NB_SAMPLES);
|
||||
adc_buf_channel(ADC_7, &buf_adc[7], ADC_NB_SAMPLES);
|
||||
|
||||
#if NB_ADC != 8
|
||||
#error "8 ADCs expected !"
|
||||
#endif
|
||||
|
||||
#ifdef USE_UART0
|
||||
Uart0Init();
|
||||
#endif
|
||||
#ifdef USE_UART1
|
||||
Uart1Init();
|
||||
#endif
|
||||
|
||||
int_enable();
|
||||
|
||||
while(1) {
|
||||
if (sys_time_periodic()) {
|
||||
LED_TOGGLE(1);
|
||||
uint16_t values[NB_ADC];
|
||||
uint8_t i;
|
||||
for(i = 0; i < NB_ADC; i++)
|
||||
values[i] = buf_adc[i].sum / ADC_NB_SAMPLES;
|
||||
|
||||
uint8_t id = 42;
|
||||
DOWNLINK_SEND_ADC(&id, NB_ADC, values);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+3
-3
@@ -97,10 +97,10 @@ void xbee_init( void );
|
||||
#define XBeeTransportPutNamedUint8(_name, _byte) XBeeTransportPutUint8(_byte)
|
||||
|
||||
#define XBeeTransportPutArray(_put, _n, _x) { \
|
||||
uint8_t i; \
|
||||
uint8_t _i; \
|
||||
XBeeTransportPutUint8(_n); \
|
||||
for(i = 0; i < _n; i++) { \
|
||||
_put(&_x[i]); \
|
||||
for(_i = 0; _i < _n; _i++) { \
|
||||
_put(&_x[_i]); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user