Skip to content

Commit 2471afd

Browse files
committed
payload deliverer: remove PD_GRIPPER_EN as unnecessary, reduce gripper timeout to 1s
1 parent aab5ed8 commit 2471afd

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
@@ -337,11 +337,7 @@ then
337337
gyro_calibration start
338338
fi
339339

340-
# Payload deliverer module if gripper is enabled
341-
if param compare -s PD_GRIPPER_EN 1
342-
then
343-
payload_deliverer start
344-
fi
340+
payload_deliverer start
345341

346342
if param compare -s ICE_EN 1
347343
then

ROMFS/px4fmu_common/init.d/rcS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,7 @@ else
560560
px4flow start -X &
561561
fi
562562

563-
# Payload deliverer module if gripper is enabled
564-
if param compare -s PD_GRIPPER_EN 1
565-
then
566-
payload_deliverer start
567-
fi
563+
payload_deliverer start
568564

569565
if param compare -s ICE_EN 1
570566
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)