Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splitting preflight and land disarm times into 2 parameters #12608

Merged
merged 6 commits into from
Aug 14, 2019

Conversation

catch-twenty-two
Copy link
Contributor

@catch-twenty-two catch-twenty-two commented Aug 2, 2019

Describe problem solved by the proposed pull request
This splits preflight takeoff (vehicle has never taken off after being armed) and landing disarm times into 2 different parameters.

Parameter description is as follows:

PARAM_DEFINE_FLOAT(COM_DISARM_LAND, 5.0f);

Time-out for auto disarm after landing
A non-zero, positive value specifies the time-out period in seconds after which the vehicle will be
automatically disarmed in case a landing situation has been detected during this period.
A negative value means that automatic disarming triggered by landing detection is disabled.

PARAM_DEFINE_FLOAT(COM_DISARM_PRFLT, 2.0f);

Time-out for auto disarm before the first take off
A non-zero, positive value specifies the time-out period in seconds after which the vehicle will be
automatically disarmed when the vehicle has never taken off.
A negative value means that automatic disarming triggered by a pre-takeoff timeout is disabled.

Test data / coverage
Was tested in the simulator

@catch-twenty-two catch-twenty-two self-assigned this Aug 2, 2019
@dagar
Copy link
Member

dagar commented Aug 2, 2019

@dagar dagar self-requested a review August 2, 2019 16:34
@catch-twenty-two catch-twenty-two force-pushed the pr-spilt-pretakeoff-land-disarm-param-time branch from 7e42e9c to d8cec42 Compare August 2, 2019 16:41
@catch-twenty-two
Copy link
Contributor Author

Thx, should be fixed

@RomanBapst
Copy link
Contributor

Just to give a bit more background information: In some use cases like filming it's desirable to have the drone idling on the ground ready to takeoff any second. It's very annoying if the drone keeps disarming, hence the addition of this parameter.
It can make the difference between getting the perfect shot and missing it.

@RomanBapst
Copy link
Contributor

@hamishwillee Pinging you here just to make sure we don't miss this in the docs.

@RomanBapst
Copy link
Contributor

@hamishwillee I assume this will need changes in QGC as well:
image

PARAM_DEFINE_FLOAT(COM_DISARM_LAND, 5.0f);

/**
* Time-out for auto disarm before the first take off
Copy link
Contributor

@hamishwillee hamishwillee Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably "... before takeoff". Because someone can land and use this again after disarming/rearming.

Thought I somewhat prefer "Time-out for auto disarm if too slow to takeoff"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the default value of 2 seconds?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, better 2s for disarm after landing, 10s for disarm before takeoff.


/**
* Time-out for auto disarm before the first take off
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RomanBapst What happens if they specify 0 - this case is not covered in doc.

/**
* Time-out for auto disarm before the first take off
*
* A non-zero, positive value specifies the time-out period in seconds after which the vehicle will be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A non-zero, positive value specifies the time after arming, in seconds, within which the vehicle must take off (after which it will automatically disarm).

* @unit s
* @decimal 2
*/
PARAM_DEFINE_FLOAT(COM_DISARM_PRFLT, 2.0f);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RomanBapst This seems way too short. IMO should be about 10 seconds (I think it was shortened to allow quick auto-disarm, but since they no longer need to match, 10 seconds is far more reasonable).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Hamish, we should not change the default value of 10 seconds

@hamishwillee
Copy link
Contributor

Thanks for the heads up Roman! Docs PR created in PX4/PX4-user_guide#542 . There won't be any QGC docs changes (unless you add a safety page setting for the new param).

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I just don't understand why you changed the defaults.

PARAM_DEFINE_FLOAT(COM_DISARM_LAND, 5.0f);

/**
* Time-out for auto disarm before the first take off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the default value of 2 seconds?

* @unit s
* @decimal 2
*/
PARAM_DEFINE_FLOAT(COM_DISARM_PRFLT, 2.0f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Hamish, we should not change the default value of 10 seconds

@catch-twenty-two
Copy link
Contributor Author

catch-twenty-two commented Aug 5, 2019

@bresch @hamishwillee I wasn't sure why the original values were chosen, I figured it was 10 and 2 because there wasn't an option to change the initial pre takeoff time to a desired value so compromises were made. I'll change them back to there original values, I should have pointed this decision out in my PR comments.

@catch-twenty-two catch-twenty-two force-pushed the pr-spilt-pretakeoff-land-disarm-param-time branch from 9464b36 to 1c4d081 Compare August 5, 2019 13:49
@hamishwillee
Copy link
Contributor

hamishwillee commented Aug 6, 2019

I wasn't sure why the original values were chosen, I figured it was 10 and 2 because there wasn't an option to change the inital pre takeoff time to a desired value so a compromises were made.

@catch-twenty-two No worries. Thanks.

The times are a safety and usability compromise. For takeoff a new user (in particular) needs a bit of time after arming to take off - but not too long or they might wander over while the vehicle is armed. For landing you pretty much want disarming to happen immediately in most cases - I am not sure why 2s rather than 3 or 0.5, but it is pretty reasonable.

@catch-twenty-two
Copy link
Contributor Author

@dagar it looks like the others have signed off on this, okay to merge?

dagar
dagar previously approved these changes Aug 8, 2019
bresch
bresch previously approved these changes Aug 8, 2019
* A non-zero, positive value specifies the time after arming, in seconds, within which the
* vehicle must take off (after which it will automatically disarm).
*
* A negative value means that automatic disarming triggered by a pre-takeoff timeout is disabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee @catch-twenty-two I believe it should be "A zero or negative value means that ..."

@RomanBapst
Copy link
Contributor

@catch-twenty-two I think if you clarify on the parameter description that the auto disarm is disabled for value =0 then we can get this in.

Addressing parameter description syntax
@catch-twenty-two catch-twenty-two dismissed stale reviews from bresch and dagar via afb00c2 August 8, 2019 20:10
@bresch bresch merged commit 9e3493b into master Aug 14, 2019
@bresch bresch deleted the pr-spilt-pretakeoff-land-disarm-param-time branch August 14, 2019 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants