Skip to content

Commit 463ddca

Browse files
committed
payload deliverer: remove PD_GRIPPER_EN as unnecessary, reduce gripper timeout to 1s
1 parent 8d4993e commit 463ddca

File tree

6 files changed

+7
-23
lines changed

6 files changed

+7
-23
lines changed

ROMFS/px4fmu_common/init.d-posix/rcS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,7 @@ then
345345
gyro_calibration start
346346
fi
347347

348-
# Payload deliverer module if gripper is enabled
349-
if param compare -s PD_GRIPPER_EN 1
350-
then
351-
payload_deliverer start
352-
fi
348+
payload_deliverer start
353349

354350
if param compare -s ICE_EN 1
355351
then

ROMFS/px4fmu_common/init.d/rcS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,7 @@ else
568568
px4flow start -X &
569569
fi
570570

571-
# Payload deliverer module if gripper is enabled
572-
if param compare -s PD_GRIPPER_EN 1
573-
then
574-
payload_deliverer start
575-
fi
571+
payload_deliverer start
576572

577573
if param compare -s ICE_EN 1
578574
then

docs/en/peripherals/gripper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ MAVLink applications, such as ground stations, can also control the gripper usin
3838

3939
PX4 gripper support is tied to the package delivery feature, which must be enabled and configured in order to be able to use a gripper.
4040

41-
1. Set [PD_GRIPPER_EN](../advanced_config/parameter_reference.md#PD_GRIPPER_EN) parameter to 1 (reboot required after change).
41+
1. Ensure your board has the Payload Deliverer module enabled: CONFIG_MODULES_PAYLOAD_DELIVERER.
4242
1. Set [PD_GRIPPER_TYPE](../advanced_config/parameter_reference.md#PD_GRIPPER_TYPE) to match your gripper.
4343
For example, set to `Servo` for a [Servo Gripper](gripper_servo.md).
4444

src/modules/payload_deliverer/module.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ parameters:
55
definitions:
66

77
# Gripper configuration
8-
PD_GRIPPER_EN:
9-
description:
10-
short: Enable Gripper actuation in Payload Deliverer
11-
type: boolean
12-
default: 0
13-
reboot_required: true
14-
158
PD_GRIPPER_TYPE:
169
description:
1710
short: Type of Gripper (Servo, etc.)
@@ -34,4 +27,4 @@ parameters:
3427
type: float
3528
unit: s
3629
min: 0
37-
default: 3
30+
default: 1

src/modules/payload_deliverer/payload_deliverer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ bool PayloadDeliverer::init()
5454
void PayloadDeliverer::configure_gripper()
5555
{
5656
// If gripper instance is invalid, and user enabled the gripper, try initializing it
57-
if (!_gripper.is_valid() && _param_gripper_enable.get()) {
57+
if (!_gripper.is_valid()) {
5858
GripperConfig config{};
5959
config.type = (GripperConfig::GripperType)_param_gripper_type.get();
6060
config.sensor = GripperConfig::GripperSensorType::NONE; // Feedback sensor isn't supported for now

src/modules/payload_deliverer/payload_deliverer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class PayloadDeliverer : public ModuleBase<PayloadDeliverer>, public ModuleParam
104104
/**
105105
* @brief Initialize or deinitialize gripper instance based on parameter settings
106106
*
107-
* Depending on `PD_GRIPPER_EN` and the state of `_gripper` instance, this function will
107+
* Depending on the state of `_gripper` instance, this function will
108108
* either try to initialize or de-initialize the gripper appropriately.
109109
*/
110110
void configure_gripper();
@@ -159,7 +159,6 @@ class PayloadDeliverer : public ModuleBase<PayloadDeliverer>, public ModuleParam
159159

160160
DEFINE_PARAMETERS(
161161
(ParamFloat<px4::params::PD_GRIPPER_TO>) _param_gripper_timeout_s,
162-
(ParamInt<px4::params::PD_GRIPPER_TYPE>) _param_gripper_type,
163-
(ParamBool<px4::params::PD_GRIPPER_EN>) _param_gripper_enable
162+
(ParamInt<px4::params::PD_GRIPPER_TYPE>) _param_gripper_type
164163
)
165164
};

0 commit comments

Comments
 (0)