diff --git a/conf/modules/airspeed_amsys.xml b/conf/modules/airspeed_amsys.xml
index da60b5aa69..5deffea0fb 100644
--- a/conf/modules/airspeed_amsys.xml
+++ b/conf/modules/airspeed_amsys.xml
@@ -8,7 +8,7 @@
(AMS 5812-0003-D)
(AMS 5812-0001-D)
-
+
@@ -34,6 +34,13 @@
+
+ AIRSPEED_AMSYS_I2C_DEV ?= i2c0
+ AIRSPEED_AMSYS_I2C_DEV_LOWER=$(shell echo $(AIRSPEED_AMSYS_I2C_DEV) | tr A-Z a-z)
+ AIRSPEED_AMSYS_I2C_DEV_UPPER=$(shell echo $(AIRSPEED_AMSYS_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/airspeed_ets.xml b/conf/modules/airspeed_ets.xml
index aaaabb73e7..2f6dfcff9e 100644
--- a/conf/modules/airspeed_ets.xml
+++ b/conf/modules/airspeed_ets.xml
@@ -18,7 +18,7 @@
- Yellow wire: SDA
- Brown wire: SCL
-
+
@@ -35,6 +35,13 @@
+
+ AIRSPEED_ETS_I2C_DEV ?= i2c0
+ AIRSPEED_ETS_I2C_DEV_LOWER=$(shell echo $(AIRSPEED_ETS_I2C_DEV) | tr A-Z a-z)
+ AIRSPEED_ETS_I2C_DEV_UPPER=$(shell echo $(AIRSPEED_ETS_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_amsys.xml b/conf/modules/baro_amsys.xml
index 6118f779d3..5517515208 100644
--- a/conf/modules/baro_amsys.xml
+++ b/conf/modules/baro_amsys.xml
@@ -6,7 +6,7 @@
Baro AMSYS (I2C).
Module to read a Amsys AMS 5812-0150-A barometric sensor via I2C.
-
+
@@ -30,6 +30,13 @@
+
+ BARO_AMSYS_I2C_DEV ?= i2c0
+ BARO_AMSYS_I2C_DEV_LOWER=$(shell echo $(BARO_AMSYS_I2C_DEV) | tr A-Z a-z)
+ BARO_AMSYS_I2C_DEV_UPPER=$(shell echo $(BARO_AMSYS_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_bmp.xml b/conf/modules/baro_bmp.xml
index 1bf6bde874..0b1cdf9530 100644
--- a/conf/modules/baro_bmp.xml
+++ b/conf/modules/baro_bmp.xml
@@ -3,7 +3,7 @@
Bosch BMP085 pressure sensor
-
+
@@ -13,6 +13,13 @@
+
+ BMP_I2C_DEV ?= i2c0
+ BMP_I2C_DEV_LOWER=$(shell echo $(BMP_I2C_DEV) | tr A-Z a-z)
+ BMP_I2C_DEV_UPPER=$(shell echo $(BMP_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_ets.xml b/conf/modules/baro_ets.xml
index ec53f74a56..9bab9384b4 100644
--- a/conf/modules/baro_ets.xml
+++ b/conf/modules/baro_ets.xml
@@ -18,7 +18,7 @@
- Brown wire: SCL
-
+
@@ -34,6 +34,13 @@
+
+ BARO_ETS_I2C_DEV ?= i2c0
+ BARO_ETS_I2C_DEV_LOWER=$(shell echo $(BARO_ETS_I2C_DEV) | tr A-Z a-z)
+ BARO_ETS_I2C_DEV_UPPER=$(shell echo $(BARO_ETS_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_hca.xml b/conf/modules/baro_hca.xml
index 3a368f48d8..b4c25f0b98 100644
--- a/conf/modules/baro_hca.xml
+++ b/conf/modules/baro_hca.xml
@@ -3,7 +3,7 @@
Baro sensortechnics HCA (I2C)
-
+
@@ -14,6 +14,13 @@
+
+ BARO_HCA_I2C_DEV ?= i2c0
+ BARO_HCA_I2C_DEV_LOWER=$(shell echo $(BARO_HCA_I2C_DEV) | tr A-Z a-z)
+ BARO_HCA_I2C_DEV_UPPER=$(shell echo $(BARO_HCA_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_ms5611_i2c.xml b/conf/modules/baro_ms5611_i2c.xml
index 027cd4061c..49268e25ec 100644
--- a/conf/modules/baro_ms5611_i2c.xml
+++ b/conf/modules/baro_ms5611_i2c.xml
@@ -6,7 +6,7 @@
Baro MS5611 (I2C)
Measurement Specialties MS5611-01BA pressure sensor (I2C)
-
+
@@ -17,6 +17,13 @@
+
+ MS5611_I2C_DEV ?= i2c0
+ MS5611_I2C_DEV_LOWER=$(shell echo $(MS5611_I2C_DEV) | tr A-Z a-z)
+ MS5611_I2C_DEV_UPPER=$(shell echo $(MS5611_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/baro_scp_i2c.xml b/conf/modules/baro_scp_i2c.xml
index 3b09407f7f..1b71ee439c 100644
--- a/conf/modules/baro_scp_i2c.xml
+++ b/conf/modules/baro_scp_i2c.xml
@@ -3,7 +3,7 @@
VTI SCP1000 pressure sensor (I2C)
-
+
@@ -13,6 +13,13 @@
+
+ SCP_I2C_DEV ?= i2c0
+ SCP_I2C_DEV_LOWER=$(shell echo $(SCP_I2C_DEV) | tr A-Z a-z)
+ SCP_I2C_DEV_UPPER=$(shell echo $(SCP_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/digital_cam_i2c.xml b/conf/modules/digital_cam_i2c.xml
index b076bb9ee6..975f9593cf 100644
--- a/conf/modules/digital_cam_i2c.xml
+++ b/conf/modules/digital_cam_i2c.xml
@@ -10,6 +10,7 @@
Using the PAYLOAD_COMMAND, all functions of the camera can be controlled.
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
+
@@ -26,10 +27,15 @@
+
+ ATMEGA_I2C_DEV ?= i2c0
+ ATMEGA_I2C_DEV_LOWER=$(shell echo $(ATMEGA_I2C_DEV) | tr A-Z a-z)
+ ATMEGA_I2C_DEV_UPPER=$(shell echo $(ATMEGA_I2C_DEV) | tr a-z A-Z)
+
+
+
-
-
diff --git a/conf/modules/ezcurrent.xml b/conf/modules/ezcurrent.xml
index 80bdf6021a..a748b79499 100644
--- a/conf/modules/ezcurrent.xml
+++ b/conf/modules/ezcurrent.xml
@@ -3,7 +3,7 @@
EzOSD Current sensor (I2C).
-
+
@@ -14,6 +14,13 @@
+
+ EZCURRENT_I2C_DEV ?= i2c0
+ EZCURRENT_I2C_DEV_LOWER=$(shell echo $(EZCURRENT_I2C_DEV) | tr A-Z a-z)
+ EZCURRENT_I2C_DEV_UPPER=$(shell echo $(EZCURRENT_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/generic_com.xml b/conf/modules/generic_com.xml
index 35b3496269..42470d8453 100644
--- a/conf/modules/generic_com.xml
+++ b/conf/modules/generic_com.xml
@@ -6,7 +6,7 @@
Generic com.
Can be used for Satcom/GSM
-
+
@@ -16,6 +16,13 @@
+
+ GENERIC_COM_I2C_DEV ?= i2c0
+ GENERIC_COM_I2C_DEV_LOWER=$(shell echo $(GENERIC_COM_I2C_DEV) | tr A-Z a-z)
+ GENERIC_COM_I2C_DEV_UPPER=$(shell echo $(GENERIC_COM_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/humid_htm_b71.xml b/conf/modules/humid_htm_b71.xml
index be0cfa000a..9500907ed2 100644
--- a/conf/modules/humid_htm_b71.xml
+++ b/conf/modules/humid_htm_b71.xml
@@ -3,7 +3,7 @@
TronSens HTM-B71 humidity sensor (I2C)
-
+
@@ -13,6 +13,13 @@
+
+ HTM_I2C_DEV ?= i2c0
+ HTM_I2C_DEV_LOWER=$(shell echo $(HTM_I2C_DEV) | tr A-Z a-z)
+ HTM_I2C_DEV_UPPER=$(shell echo $(HTM_I2C_DEV) | tr a-z A-Z)
+
+
+
diff --git a/conf/modules/imu_mpu9250.xml b/conf/modules/imu_mpu9250.xml
index c1b39854ed..5ff64c6dfb 100644
--- a/conf/modules/imu_mpu9250.xml
+++ b/conf/modules/imu_mpu9250.xml
@@ -17,12 +17,17 @@
+
+ IMU_MPU9250_I2C_DEV ?= i2c1
+ IMU_MPU9250_I2C_DEV_LOWER=$(shell echo $(IMU_MPU9250_I2C_DEV) | tr A-Z a-z)
+ IMU_MPU9250_I2C_DEV_UPPER=$(shell echo $(IMU_MPU9250_I2C_DEV) | tr a-z A-Z)
+
+
+
-
-
diff --git a/conf/modules/mag_hmc5843.xml b/conf/modules/mag_hmc5843.xml
index 3d922fee0c..c14e5801a2 100644
--- a/conf/modules/mag_hmc5843.xml
+++ b/conf/modules/mag_hmc5843.xml
@@ -3,6 +3,7 @@
hmc5843 magnetometer
+
@@ -11,11 +12,15 @@
-
+
+ HMC5843_I2C_DEV ?= i2c0
+ HMC5843_I2C_DEV_LOWER=$(shell echo $(HMC5843_I2C_DEV) | tr A-Z a-z)
+ HMC5843_I2C_DEV_UPPER=$(shell echo $(HMC5843_I2C_DEV) | tr a-z A-Z)
+
+
+
-
-
diff --git a/conf/modules/mag_hmc58xx.xml b/conf/modules/mag_hmc58xx.xml
index 491a4c202a..85dc38feb5 100644
--- a/conf/modules/mag_hmc58xx.xml
+++ b/conf/modules/mag_hmc58xx.xml
@@ -26,9 +26,9 @@
$(error mag_hmc58xx module error: please configure MAG_HMC58XX_I2C_DEV)
endif
MAG_HMC58XX_I2C_DEV_UPPER=$(shell echo $(MAG_HMC58XX_I2C_DEV) | tr a-z A-Z)
+ MAG_HMC58XX_I2C_DEV_LOWER=$(shell echo $(MAG_HMC58XX_I2C_DEV) | tr A-Z a-z)
-
-
+
diff --git a/conf/modules/temp_temod.xml b/conf/modules/temp_temod.xml
index d9dca0d7c3..f6cfe7f625 100644
--- a/conf/modules/temp_temod.xml
+++ b/conf/modules/temp_temod.xml
@@ -1,15 +1,9 @@
-
-
Hygrosens TEMOD-I2C-Rx temperature sensor
-
+
@@ -19,6 +13,13 @@
+
+ TEMOD_DEV ?= i2c0
+ TEMOD_DEV_LOWER=$(shell echo $(TEMOD_DEV) | tr A-Z a-z)
+ TEMOD_DEV_UPPER=$(shell echo $(TEMOD_DEV) | tr a-z A-Z)
+
+
+
diff --git a/sw/airborne/modules/enose/enose.h b/sw/airborne/modules/enose/enose.h
index b064810945..fa5b16cba3 100644
--- a/sw/airborne/modules/enose/enose.h
+++ b/sw/airborne/modules/enose/enose.h
@@ -3,13 +3,6 @@
#include "std.h"
-#ifdef ENOSE
-#if !defined USE_I2C && !defined SITL
-#define USE_I2C
-#endif
-#endif
-
-
#define ENOSE_NB_SENSOR 3
extern uint8_t enose_heat[ENOSE_NB_SENSOR];