diff --git a/sw/airborne/ap_downlink.h b/sw/airborne/ap_downlink.h index aa9364e912..4f716a6058 100644 --- a/sw/airborne/ap_downlink.h +++ b/sw/airborne/ap_downlink.h @@ -45,6 +45,8 @@ #include "messages.h" #include "periodic.h" +//#include "modules.h" + #if defined DOWNLINK #define Downlink(x) x #else @@ -100,7 +102,7 @@ #define PERIODIC_SEND_SETTINGS(_chan) {} #endif -#ifdef INFRARED +#if defined INFRARED || 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) ; diff --git a/sw/airborne/sim/sim_ir.c b/sw/airborne/sim/sim_ir.c index ec8e23d017..5005294a94 100644 --- a/sw/airborne/sim/sim_ir.c +++ b/sw/airborne/sim/sim_ir.c @@ -21,7 +21,7 @@ value set_ir(value roll __attribute__ ((unused)), value top __attribute__ ((unused)), value air_speed ) { -#ifdef INFRARED +#if defined INFRARED || INFRARED_I2C ir_roll = Int_val(roll); ir_pitch = Int_val(front); ir_top = Int_val(top);