Browse Source

add both options (pwm/i2c) for lidar lite

sbg
Mohamed Abdelkader Zahana 8 years ago committed by Kabir Mohammed
parent
commit
60e0ca9321
  1. 17
      ROMFS/px4fmu_common/init.d/rcS
  2. 9
      src/modules/sensors/sensor_params.c

17
ROMFS/px4fmu_common/init.d/rcS

@ -471,6 +471,12 @@ then @@ -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 @@ -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

9
src/modules/sensors/sensor_params.c

@ -3230,12 +3230,15 @@ PARAM_DEFINE_INT32(RC_RSSI_PWM_MAX, 1000); @@ -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);

Loading…
Cancel
Save