mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
change INFRARED flag to USE_INFRARED
This commit is contained in:
@@ -115,7 +115,7 @@
|
||||
#define PERIODIC_SEND_SETTINGS(_chan) {}
|
||||
#endif
|
||||
|
||||
#if defined INFRARED || INFRARED_I2C
|
||||
#if defined USE_INFRARED || USE_INFRARED_I2C
|
||||
#define PERIODIC_SEND_IR_SENSORS(_chan) DOWNLINK_SEND_IR_SENSORS(_chan, &ir_ir1, &ir_ir2, &ir_pitch, &ir_roll, &ir_top);
|
||||
#else
|
||||
#define PERIODIC_SEND_IR_SENSORS(_chan) ;
|
||||
|
||||
@@ -20,7 +20,7 @@ void set_ir(double roll, double pitch) {
|
||||
double ir_contrast = 150; //FIXME
|
||||
double roll_sensor = roll + JSBSIM_IR_ROLL_NEUTRAL; // ir_roll_neutral;
|
||||
double pitch_sensor = pitch + JSBSIM_IR_PITCH_NEUTRAL; // ir_pitch_neutral;
|
||||
#ifdef INFRARED
|
||||
#ifdef USE_INFRARED
|
||||
ir_roll = sin(roll_sensor) * ir_contrast;
|
||||
ir_pitch = sin(pitch_sensor) * ir_contrast;
|
||||
ir_top = cos(roll_sensor) * cos(pitch_sensor) * ir_contrast;
|
||||
|
||||
@@ -21,7 +21,7 @@ value set_ir(value roll __attribute__ ((unused)),
|
||||
value top __attribute__ ((unused)),
|
||||
value air_speed
|
||||
) {
|
||||
#if defined INFRARED || INFRARED_I2C
|
||||
#if defined USE_INFRARED || USE_INFRARED_I2C
|
||||
ir_roll = Int_val(roll);
|
||||
ir_pitch = Int_val(front);
|
||||
ir_top = Int_val(top);
|
||||
|
||||
@@ -455,10 +455,10 @@ void periodic_task_ap( void ) {
|
||||
gyro_update();
|
||||
#endif
|
||||
|
||||
#ifdef INFRARED
|
||||
#ifdef USE_INFRARED
|
||||
ir_update();
|
||||
estimator_update_state_infrared();
|
||||
#endif /* INFRARED */
|
||||
#endif /* USE_INFRARED */
|
||||
h_ctl_attitude_loop(); /* Set h_ctl_aileron_setpoint & h_ctl_elevator_setpoint */
|
||||
v_ctl_throttle_slew();
|
||||
ap_state->commands[COMMAND_THROTTLE] = v_ctl_throttle_slewed;
|
||||
@@ -493,7 +493,7 @@ void init_ap( void ) {
|
||||
#endif /* SINGLE_MCU */
|
||||
|
||||
/************* Sensors initialization ***************/
|
||||
#ifdef INFRARED
|
||||
#ifdef USE_INFRARED
|
||||
ir_init();
|
||||
#endif
|
||||
#ifdef GYRO
|
||||
|
||||
@@ -265,7 +265,7 @@ void parse_ugear_msg( void ){
|
||||
ins_phi = (float)ugear_phi/10000 - ins_roll_neutral;
|
||||
ins_psi = 0;
|
||||
ins_theta = (float)ugear_theta/10000 - ins_pitch_neutral;
|
||||
#ifndef INFRARED
|
||||
#ifndef USE_INFRARED
|
||||
EstimatorSetAtt(ins_phi, ins_psi, ins_theta);
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user