mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 12:23:23 +08:00
*** empty log message ***
This commit is contained in:
@@ -35,12 +35,6 @@ TARGET = autopilot
|
||||
LOW_FUSE = e0
|
||||
HIGH_FUSE = 99
|
||||
|
||||
ifeq ($(CTL_BRD_VERSION),V1_1)
|
||||
LOW_FUSE = ff
|
||||
HIGH_FUSE = 89
|
||||
CTL_BRD_FLAGS=-DCTL_BRD_V1_1
|
||||
endif
|
||||
|
||||
ifeq ($(SIMUL),1)
|
||||
SIMUL_FLAGS= -DSIMUL
|
||||
endif
|
||||
|
||||
@@ -50,13 +50,7 @@
|
||||
#define ANALOG_PORT_DIR DDRF
|
||||
|
||||
|
||||
#ifdef CTL_BRD_V1_1
|
||||
#define ANALOG_VREF 0
|
||||
#endif
|
||||
|
||||
#if defined CTL_BRD_V1_2 || defined CTL_BRD_V1_2_1
|
||||
#define ANALOG_VREF _BV(REFS0)
|
||||
#endif
|
||||
|
||||
uint16_t adc_samples[ NB_ADC ];
|
||||
|
||||
|
||||
@@ -98,9 +98,6 @@ extern bool_t launch;
|
||||
|
||||
#define CheckEvent(_event) (_event ? _event = FALSE, TRUE : FALSE)
|
||||
|
||||
#ifdef CTL_BRD_V1_1
|
||||
extern struct adc_buf buf_bat;
|
||||
#endif
|
||||
|
||||
void periodic_task( void );
|
||||
void use_gps_pos(void);
|
||||
|
||||
@@ -148,6 +148,15 @@ void estimator_update_state_infrared( void ) {
|
||||
estimator_theta = rad_of_ir * ir_pitch;
|
||||
}
|
||||
|
||||
|
||||
#include "link_fbw.h"
|
||||
void estimator_update_state_3DMG ( void ) {
|
||||
estimator_phi = from_fbw.euler[0];
|
||||
estimator_psi = from_fbw.euler[1];
|
||||
estimator_theta = from_fbw.euler[2];
|
||||
}
|
||||
|
||||
|
||||
#define INIT_WEIGHT 100. /* The number of times the initial value has to be taken */
|
||||
#define RHO 0.999 /* The higher, the slower the estimation is changing */
|
||||
|
||||
|
||||
@@ -492,7 +492,9 @@ inline void periodic_task( void ) {
|
||||
}
|
||||
case 2:
|
||||
ir_update();
|
||||
#ifndef IMU_TYPE_3DMG
|
||||
estimator_update_state_infrared();
|
||||
#endif
|
||||
roll_pitch_pid_run(); /* Set desired_aileron & desired_elevator */
|
||||
to_fbw.channels[RADIO_THROTTLE] = desired_gaz; /* desired_gaz is set upon GPS message reception */
|
||||
to_fbw.channels[RADIO_ROLL] = desired_aileron;
|
||||
|
||||
@@ -58,9 +58,6 @@ int main( void ) {
|
||||
timer_init();
|
||||
modem_init();
|
||||
adc_init();
|
||||
#ifdef CTL_BRD_V1_1
|
||||
adc_buf_channel(ADC_CHANNEL_BAT, &buf_bat, DEFAULT_AV_NB_SAMPLE);
|
||||
#endif
|
||||
spi_init();
|
||||
link_fbw_init();
|
||||
gps_init();
|
||||
@@ -103,7 +100,7 @@ int main( void ) {
|
||||
radio_control_task();
|
||||
#ifdef IMU_TYPE_3DMG
|
||||
DOWNLINK_SEND_IMU_3DMG(&from_fbw.euler_dot[0], &from_fbw.euler_dot[1], &from_fbw.euler_dot[2], &from_fbw.euler[0], &from_fbw.euler[1], &from_fbw.euler[2]);
|
||||
|
||||
estimator_update_state_3DMG();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,16 +53,6 @@ extern uint8_t ck_a, ck_b;
|
||||
#define MODEM_TX_EN 7
|
||||
#define MODEM_TX_DATA 6
|
||||
|
||||
#ifdef CTL_BRD_V1_1
|
||||
#define MODEM_CLK_DDR DDRD
|
||||
#define MODEM_CLK_PORT PORTD
|
||||
#define MODEM_CLK 0
|
||||
#define MODEM_CLK_INT INT0
|
||||
#define MODEM_CLK_INT_REG EICRA
|
||||
#define MODEM_CLK_INT_CFG _BV(ISC01)
|
||||
#define MODEM_CLK_INT_SIG SIG_INTERRUPT0
|
||||
#endif /* CTL_BRD_V1_1 */
|
||||
|
||||
#ifdef CTL_BRD_V1_2
|
||||
#define MODEM_CLK_DDR DDRD
|
||||
#define MODEM_CLK_PORT PORTD
|
||||
|
||||
Reference in New Issue
Block a user