-
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
[DO NOT MERGE] Fixed wing land-detector block #13797
Changes from all commits
5b33738
e697c5d
c9b3033
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,7 @@ static struct actuator_armed_s armed = {}; | |
|
||
static struct vehicle_status_flags_s status_flags = {}; | ||
|
||
static struct position_controller_status_s controller_status = {}; //Struct for holding controller status | ||
/** | ||
* Loop that runs at a lower rate and priority for calibration and parameter tasks. | ||
*/ | ||
|
@@ -1547,9 +1548,12 @@ Commander::run() | |
_was_falling = _land_detector.freefall; | ||
} | ||
|
||
if (_controller_status_sub.updated()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can move this within the auto disarm block below and only store a boolean (in the class) for launch_detection_running. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in the other PR. I'll wait for that to get all sorted out and re-base this branch properly. In the meantime is there anything within the Fixed Wing Land Detection that should be changed? |
||
_controller_status_sub.copy(&controller_status); | ||
} | ||
|
||
// Auto disarm when landed or kill switch engaged | ||
if (armed.armed) { | ||
// Auto disarm when landed or kill switch engaged and do not auto-disarm if launch detection is running | ||
if (armed.armed && !controller_status.launch_detection_running) { | ||
|
||
// Check for auto-disarm on landing or pre-flight | ||
if (_param_com_disarm_land.get() > 0 || _param_com_disarm_preflight.get() > 0) { | ||
|
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.