-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Conversation
Minor code style failure in CI. http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2FFirmware/detail/PR-12608/1/pipeline |
7e42e9c
to
d8cec42
Compare
Thx, should be fixed |
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. |
@hamishwillee Pinging you here just to make sure we don't miss this in the docs. |
@hamishwillee I assume this will need changes in QGC as well: |
PARAM_DEFINE_FLOAT(COM_DISARM_LAND, 5.0f); | ||
|
||
/** | ||
* Time-out for auto disarm before the first take off |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 | ||
* |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
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). |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
@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. |
9464b36
to
1c4d081
Compare
@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. |
@dagar it looks like the others have signed off on this, okay to merge? |
* 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. |
There was a problem hiding this comment.
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 ..."
@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
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