2014-11-01 09:09:52 +08:00
|
|
|
# SConscript for sensor framework
|
|
|
|
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2015-02-01 16:17:06 +08:00
|
|
|
src = ['sensor.cpp']
|
2014-11-01 09:09:52 +08:00
|
|
|
CPPPATH = [cwd, cwd + '/../include']
|
|
|
|
|
2015-02-01 16:50:54 +08:00
|
|
|
if GetDepend('SENSOR_USING_MPU6050') and GetDepend('RT_USING_I2C'):
|
2015-02-01 16:17:06 +08:00
|
|
|
src += ['mpu6050_sensor.cpp'];
|
|
|
|
|
2015-02-01 16:50:54 +08:00
|
|
|
if GetDepend('SENSOR_USING_BMI055') and GetDepend('RT_USING_I2C'):
|
2015-02-01 16:17:06 +08:00
|
|
|
src += ['bmi055_sensor.cpp']
|
|
|
|
|
2014-11-01 09:09:52 +08:00
|
|
|
group = DefineGroup('Sensors', src, depend = ['RT_USING_SENSOR', 'RT_USING_DEVICE'], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|