mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
params: remove unused SENS_EN_* params
Replaced with the more general serial config params.
This commit is contained in:
parent
f2f9a7aadc
commit
f0c0b6f6e8
@ -415,12 +415,6 @@ then
|
||||
pga460 start
|
||||
fi
|
||||
|
||||
# Lightware serial lidar sensor
|
||||
if param greater SENS_EN_SF0X 0
|
||||
then
|
||||
sf0x start
|
||||
fi
|
||||
|
||||
# Lightware i2c lidar sensor
|
||||
if param greater SENS_EN_SF1XX 0
|
||||
then
|
||||
@ -439,49 +433,6 @@ then
|
||||
teraranger start -a
|
||||
fi
|
||||
|
||||
# Benewake TFMini
|
||||
if param greater SENS_EN_TFMINI 0
|
||||
then
|
||||
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
|
||||
then
|
||||
# start the driver on serial 4/5
|
||||
tfmini start -d /dev/ttyS6
|
||||
else
|
||||
if ver hwcmp AEROFC_V1
|
||||
then
|
||||
# start the driver on telemetry
|
||||
tfmini start -d /dev/ttyS3
|
||||
else
|
||||
if param compare SYS_COMPANION 0
|
||||
then
|
||||
# start on default mavlink companion device
|
||||
tfmini start -d /dev/ttyS2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# LeddarOne
|
||||
if param greater SENS_EN_LEDDAR1 0
|
||||
then
|
||||
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
|
||||
then
|
||||
# start the driver on serial 4/5
|
||||
leddar_one -d /dev/ttyS6 start
|
||||
fi
|
||||
if ver hwcmp AEROFC_V1
|
||||
then
|
||||
# start the driver on telemetry
|
||||
leddar_one -d /dev/ttyS3 start
|
||||
else
|
||||
if param compare SYS_COMPANION 0
|
||||
then
|
||||
# start on default mavlink companion device
|
||||
leddar_one -d /dev/ttyS2 start
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# End Optional drivers #
|
||||
###############################################################################
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2017 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* LeddarOne rangefinder
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @boolean
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SENS_EN_LEDDAR1, 0);
|
||||
@ -32,17 +32,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* Lightware laser rangefinder (serial)
|
||||
* Lightware Laser Rangefinder hardware model
|
||||
*
|
||||
* @reboot_required true
|
||||
* @min 0
|
||||
* @max 4
|
||||
* @group Sensors
|
||||
* @value 0 Disabled
|
||||
* @value 1 SF02
|
||||
* @value 2 SF10/a
|
||||
* @value 3 SF10/b
|
||||
* @value 4 SF10/c
|
||||
* @value 5 SF11/c
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SENS_EN_SF0X, 0);
|
||||
PARAM_DEFINE_INT32(SENS_EN_SF0X, 1);
|
||||
|
||||
@ -220,9 +220,6 @@ SF0X::init()
|
||||
param_get(param_find("SENS_EN_SF0X"), &hw_model);
|
||||
|
||||
switch (hw_model) {
|
||||
case 0:
|
||||
PX4_WARN("disabled.");
|
||||
return 0;
|
||||
|
||||
case 1: /* SF02 (40m, 12 Hz)*/
|
||||
_min_distance = 0.3f;
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2017 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* Benewake TFmini laser rangefinder
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @boolean
|
||||
* @group Sensors
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SENS_EN_TFMINI, 0);
|
||||
@ -215,14 +215,9 @@ TFMINI::~TFMINI()
|
||||
int
|
||||
TFMINI::init()
|
||||
{
|
||||
int32_t hw_model;
|
||||
param_get(param_find("SENS_EN_TFMINI"), &hw_model);
|
||||
int32_t hw_model = 1; // only one model so far...
|
||||
|
||||
switch (hw_model) {
|
||||
case 0:
|
||||
PX4_WARN("disabled.");
|
||||
return 0;
|
||||
|
||||
case 1: /* TFMINI (12m, 100 Hz)*/
|
||||
_min_distance = 0.3f;
|
||||
_max_distance = 12.0f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user