diff --git a/sw/airborne/modules/adcs/adc_generic.c b/sw/airborne/modules/adcs/adc_generic.c index 95e747a556..c2d6419b09 100644 --- a/sw/airborne/modules/adcs/adc_generic.c +++ b/sw/airborne/modules/adcs/adc_generic.c @@ -18,6 +18,10 @@ uint16_t adc_generic_val2; #define ADC_CHANNEL_GENERIC_NB_SAMPLES DEFAULT_AV_NB_SAMPLE #endif +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifdef ADC_CHANNEL_GENERIC1 static struct adc_buf buf_generic1; #endif diff --git a/sw/airborne/modules/meteo/dust_gp2y.c b/sw/airborne/modules/meteo/dust_gp2y.c index 25d5041a54..0b2ae16f69 100644 --- a/sw/airborne/modules/meteo/dust_gp2y.c +++ b/sw/airborne/modules/meteo/dust_gp2y.c @@ -43,6 +43,10 @@ float dust_gp2y_density_f; struct i2c_transaction gp2y_trans; +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef GP2Y_I2C_DEV #define GP2Y_I2C_DEV i2c0 #endif diff --git a/sw/airborne/modules/meteo/humid_dpicco.c b/sw/airborne/modules/meteo/humid_dpicco.c index 6b45e31a7e..118711c058 100644 --- a/sw/airborne/modules/meteo/humid_dpicco.c +++ b/sw/airborne/modules/meteo/humid_dpicco.c @@ -13,6 +13,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef DPICCO_I2C_DEV #define DPICCO_I2C_DEV i2c0 #endif diff --git a/sw/airborne/modules/meteo/humid_hih.c b/sw/airborne/modules/meteo/humid_hih.c index b155ccbeb4..2e61b5ca45 100644 --- a/sw/airborne/modules/meteo/humid_hih.c +++ b/sw/airborne/modules/meteo/humid_hih.c @@ -36,6 +36,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef ADC_CHANNEL_HUMID_HIH #define ADC_CHANNEL_HUMID_HIH ADC_3 #endif diff --git a/sw/airborne/modules/meteo/humid_sht.c b/sw/airborne/modules/meteo/humid_sht.c index 6b9128a40e..768244a861 100644 --- a/sw/airborne/modules/meteo/humid_sht.c +++ b/sw/airborne/modules/meteo/humid_sht.c @@ -15,6 +15,10 @@ #include "led.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + uint16_t humidsht, tempsht; float fhumidsht, ftempsht; bool_t humid_sht_available; diff --git a/sw/airborne/modules/meteo/ir_mlx.c b/sw/airborne/modules/meteo/ir_mlx.c index 105e636f22..8166f16192 100644 --- a/sw/airborne/modules/meteo/ir_mlx.c +++ b/sw/airborne/modules/meteo/ir_mlx.c @@ -38,6 +38,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef MLX_I2C_DEV #define MLX_I2C_DEV i2c0 #endif diff --git a/sw/airborne/modules/meteo/light_temt.c b/sw/airborne/modules/meteo/light_temt.c index 2272844a61..cfccd86d23 100644 --- a/sw/airborne/modules/meteo/light_temt.c +++ b/sw/airborne/modules/meteo/light_temt.c @@ -43,6 +43,10 @@ #define ADC_CHANNEL_LIGHT_NB_SAMPLES 16 #endif +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + uint16_t adc_light_temt; static struct adc_buf buf_light_temt; diff --git a/sw/airborne/modules/meteo/temp_lm75.c b/sw/airborne/modules/meteo/temp_lm75.c index eb73662c1f..510fd190a0 100644 --- a/sw/airborne/modules/meteo/temp_lm75.c +++ b/sw/airborne/modules/meteo/temp_lm75.c @@ -37,6 +37,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + uint8_t lm75_meas_started; struct i2c_transaction lm75_trans; diff --git a/sw/airborne/modules/meteo/temp_temod.c b/sw/airborne/modules/meteo/temp_temod.c index 3e2ff4fbe3..350d2e73d3 100644 --- a/sw/airborne/modules/meteo/temp_temod.c +++ b/sw/airborne/modules/meteo/temp_temod.c @@ -38,6 +38,10 @@ float ftmd_temperature; struct i2c_transaction tmd_trans; +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef TEMOD_I2C_DEV #define TEMOD_I2C_DEV i2c0 #endif @@ -48,7 +52,6 @@ struct i2c_transaction tmd_trans; #define TEMOD_SLAVE_ADDR 0xF0 - void temod_init(void) { tmd_trans.status = I2CTransDone; } diff --git a/sw/airborne/modules/meteo/temp_tmp102.c b/sw/airborne/modules/meteo/temp_tmp102.c index 4b366b6776..33c23edd7c 100644 --- a/sw/airborne/modules/meteo/temp_tmp102.c +++ b/sw/airborne/modules/meteo/temp_tmp102.c @@ -37,6 +37,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + uint8_t tmp_meas_started; float ftmp_temperature; struct i2c_transaction tmp_trans; diff --git a/sw/airborne/modules/sensors/airspeed_ets.c b/sw/airborne/modules/sensors/airspeed_ets.c index b338e1a055..4921e9c6a2 100644 --- a/sw/airborne/modules/sensors/airspeed_ets.c +++ b/sw/airborne/modules/sensors/airspeed_ets.c @@ -65,6 +65,10 @@ #define AIRSPEED_ETS_I2C_DEV i2c0 #endif +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + // Global variables uint16_t airspeed_ets_raw; uint16_t airspeed_ets_offset; diff --git a/sw/airborne/modules/sensors/alt_srf08.c b/sw/airborne/modules/sensors/alt_srf08.c index c23e9925cf..733b25f5af 100644 --- a/sw/airborne/modules/sensors/alt_srf08.c +++ b/sw/airborne/modules/sensors/alt_srf08.c @@ -34,6 +34,10 @@ #include "downlink.h" #include "led.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef SRF08_I2C_DEV #define SRF08_I2C_DEV i2c0 #endif diff --git a/sw/airborne/modules/sensors/baro_bmp.c b/sw/airborne/modules/sensors/baro_bmp.c index 261991dcac..cb28db06c1 100644 --- a/sw/airborne/modules/sensors/baro_bmp.c +++ b/sw/airborne/modules/sensors/baro_bmp.c @@ -38,6 +38,10 @@ #include "messages.h" #include "downlink.h" +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #ifndef SENSOR_SYNC_SEND #warning set SENSOR_SYNC_SEND to use baro_bmp #endif diff --git a/sw/airborne/modules/sensors/baro_scp.c b/sw/airborne/modules/sensors/baro_scp.c index 4d562cf4b0..8cc888dc60 100644 --- a/sw/airborne/modules/sensors/baro_scp.c +++ b/sw/airborne/modules/sensors/baro_scp.c @@ -18,6 +18,10 @@ #warning set SENSOR_SYNC_SEND to use baro_scp #endif +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + #define STA_UNINIT 0 #define STA_INITIALISING 1 #define STA_IDLE 2 diff --git a/sw/airborne/modules/sensors/baro_scp_i2c.c b/sw/airborne/modules/sensors/baro_scp_i2c.c index 0450647008..9a8d848f70 100644 --- a/sw/airborne/modules/sensors/baro_scp_i2c.c +++ b/sw/airborne/modules/sensors/baro_scp_i2c.c @@ -22,6 +22,10 @@ #warning set SENSOR_SYNC_SEND to use baro_scp_i2c #endif +#ifndef DOWNLINK_DEVICE +#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE +#endif + uint8_t baro_scp_status; uint32_t baro_scp_pressure; uint16_t baro_scp_temperature;