-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
SITL: Document Airspeed Params #25005
Conversation
libraries/SITL/SITL.cpp
Outdated
@@ -475,9 +475,28 @@ const AP_Param::GroupInfo SIM::AirspeedParm::var_info[] = { | |||
// @Values: 0:Disabled, 1:Enabled | |||
// @User: Advanced | |||
AP_GROUPINFO("FAIL", 3, SIM::AirspeedParm, fail, 0), | |||
// @Param: ARSPD_FAILP |
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.
The prefix is in the wrong spot, This should just be FAILP. The one level up where these are included you add the prefix. Like gripper for example.
ardupilot/libraries/SITL/SITL.cpp
Lines 217 to 219 in 9b06395
// @Group: GRPE_ | |
// @Path: ./SIM_Gripper_EPM.cpp | |
AP_SUBGROUPINFO(gripper_epm_sim, "GRPE_", 24, SIM, Gripper_EPM), |
Then the documentation should work for both airspeed 1 and 2.
d858a2e
to
e264cfe
Compare
libraries/SITL/SITL.cpp
Outdated
@@ -432,8 +439,10 @@ const AP_Param::GroupInfo SIM::var_info3[] = { | |||
// @User: Advanced | |||
AP_GROUPINFO("UART_LOSS", 42, SIM, uart_byte_loss_pct, 0), | |||
|
|||
// @Group: ARPSD_ |
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.
// @Group: ARPSD_ | |
// @Group: ARSPD_ |
60f9075
to
18ce295
Compare
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.
OK, so the parser isn't coping with the setup for these parameters, and I don't think it will be easy to make it do so.
It believes that anything that looks like a parameter or group in this file is at the same level. So here we get SIM_PITOT
, SIM_FAILP
etc etc. The ARSPD
group parameter declaration comment is missing @Path
, and we can't specify "this file" in there as that's infinite recursion. It's the @path and recursion thing which would tack on ARSPD_
to the parameter name base to get SIM_ARSPD_FAILP
.
Easiest fix is to move the definition of const AP_Param::GroupInfo SIM::AirspeedParm::var_info[] = {
into a SITL_airspeed.cpp into AP_HAL_SITL/sitl_airspeed.cpp
- and I don't think that's a terrible thing. Then just add @Path
to point to that file.
e3f6af7
to
2508292
Compare
2508292
to
afb6582
Compare
afb6582
to
5970c9e
Compare
Merged, thanks! |
Unsure how to document ARSPD2 Params