@@ -275,22 +275,13 @@ const AP_Param::Info Copter::var_info[] = {
275275 GSCALAR (disarm_delay, " DISARM_DELAY" , AUTO_DISARMING_DELAY ),
276276
277277#if MODE_POSHOLD_ENABLED
278- // @Param: PHLD_BRAKE_RATE
278+ // @Param: PHLD_BRK_RATE
279279 // @DisplayName: PosHold braking rate
280280 // @Description: PosHold flight mode's rotation rate during braking in deg/sec
281281 // @Units: deg/s
282282 // @Range: 4 12
283283 // @User: Advanced
284- GSCALAR (poshold_brake_rate_degs, " PHLD_BRAKE_RATE" , POSHOLD_BRAKE_RATE_DEFAULT ),
285-
286- // @Param: PHLD_BRAKE_ANGLE
287- // @DisplayName: PosHold braking angle max
288- // @Description: PosHold flight mode's max lean angle during braking in centi-degrees
289- // @Units: cdeg
290- // @Increment: 10
291- // @Range: 2000 4500
292- // @User: Advanced
293- GSCALAR (poshold_brake_angle_max, " PHLD_BRAKE_ANGLE" , POSHOLD_BRAKE_ANGLE_DEFAULT ),
284+ GSCALAR (poshold_brake_rate_degs, " PHLD_BRK_RATE" , POSHOLD_BRAKE_RATE_DEFAULT ),
294285#endif
295286
296287 // @Param: LAND_REPOSITION
@@ -1170,6 +1161,12 @@ const AP_Param::GroupInfo ParametersG2::var_info2[] = {
11701161 // @Path: mode_land.cpp
11711162 AP_SUBGROUPPTR (mode_land_ptr, " LAND_" , 15 , ParametersG2, ModeLand),
11721163
1164+ #if MODE_POSHOLD_ENABLED
1165+ // @Group: PHLD_
1166+ // @Path: mode_poshold.cpp
1167+ AP_SUBGROUPPTR (mode_poshold_ptr, " PHLD_" , 16 , ParametersG2, ModePosHold),
1168+ #endif
1169+
11731170 // ID 62 is reserved for the AP_SUBGROUPEXTENSION
11741171
11751172 AP_GROUPEND
@@ -1236,6 +1233,9 @@ ParametersG2::ParametersG2(void) :
12361233 ,mode_rtl_ptr(&copter.mode_rtl)
12371234#endif
12381235 ,mode_land_ptr(&copter.mode_land)
1236+ #if MODE_POSHOLD_ENABLED
1237+ ,mode_poshold_ptr(&copter.mode_poshold)
1238+ #endif
12391239{
12401240 AP_Param::setup_object_defaults (this , var_info);
12411241 AP_Param::setup_object_defaults (this , var_info2);
@@ -1308,6 +1308,11 @@ void Copter::load_parameters(void)
13081308 // convert LAND parameters
13091309 copter.mode_land .convert_params ();
13101310
1311+ #if MODE_POSHOLD_ENABLED
1312+ // convert PosHold parameters
1313+ copter.mode_poshold .convert_params ();
1314+ #endif
1315+
13111316 // setup AP_Param frame type flags
13121317 AP_Param::set_frame_type_flags (AP_PARAM_FRAME_COPTER );
13131318}
@@ -1333,8 +1338,8 @@ void Copter::convert_pid_parameters(void)
13331338 { " LOIT_BRK_DELAY" , 1 .0f },
13341339 { " LOIT_BRK_JRK_M" , 2 .5f },
13351340 { " LOIT_SPEED_MS" , 30 .0f },
1336- { " PHLD_BRAKE_ANGLE " , 800 .0f },
1337- { " PHLD_BRAKE_RATE " , 4 .0f },
1341+ { " PHLD_BRK_ANGLE " , 8 .0f },
1342+ { " PHLD_BRK_RATE " , 4 .0f },
13381343 { " PSC_D_ACC_P" , 0 .028f },
13391344 { " PSC_NE_VEL_D" , 0 .0f },
13401345 { " PSC_NE_VEL_I" , 0 .5f },
0 commit comments