add both options (pwm/i2c) for lidar lite

This commit is contained in:
Mohamed Abdelkader Zahana
2017-04-23 23:29:10 +02:00
committed by Kabir Mohammed
parent 9911a55393
commit 60e0ca9321
2 changed files with 23 additions and 3 deletions
+17
View File
@@ -471,6 +471,12 @@ then
fi
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
then
# We ONLY support trigger on pins 5 and 6 when simultanously using AUX for actuator output
@@ -731,6 +737,17 @@ then
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
if pwm_input start
then
if ll40ls start pwm
then
fi
fi
fi
# Lidar-Lite on I2C
if param compare SENS_EN_LL40LS 2
then
if pwm_input start
then
+6 -3
View File
@@ -3230,12 +3230,15 @@ PARAM_DEFINE_INT32(RC_RSSI_PWM_MAX, 1000);
PARAM_DEFINE_INT32(RC_RSSI_PWM_MIN, 2000);
/**
* Lidar-Lite (LL40LS) I2C
* Lidar-Lite (LL40LS)
*
* @reboot_required true
*
* @boolean
* @min 0
* @max 2
* @group Sensor Enable
* @value 0 Disabled
* @value 1 PWM
* @value 2 I2C
*/
PARAM_DEFINE_INT32(SENS_EN_LL40LS, 0);