Feature request. Multiline Parameter documentation parsing option in c++ source files

I am adding a parameter to Sailboat in my fork intended for ‘https://github.com/ArduPilot/ardupilot/blob/master/Rover/sailboat.cpp#L104
I am guessing the following parameter comments will break stuff due to multiline comments(/* … */). I would be interested in trying to modify whatever parses these comments to accept multiline comments in the source code. This would then make it much easier to read and comprehend the parameter comments direct in the actual source code, rather than having them run for miles off the end of the IDE/text editor window.

What do you think?


 // @Param: OPTIONS
    // @DisplayName: Sailboat options
    /* @Description: Sailboat setup options. 
       Only available for separate mainsail RC channel. */
    /* @bitmask: 0:TODO Mainsail works as traditional RC sail 
        in manual mode Range 1000 usec to 2000 usec.
        1000 usec is fully sheeted in,
        2000 usec is fully sheeted out */
    // @bitmask: 1:reserved
    // @bitmask: 2:reserved
    // @bitmask: 3:reserved
    /* @bitmask: 4:TODO mainsail channel modifies angle of attack 
          in auto, acro.
          MainSailRCIn range {1000 to 1900} usec: 
            Sail angle of attack 
               =(1.0f - (MainsailChannelIn - 1000.0f)/900.0f) *
                    SAIL_ANGLE_IDEAL.
          MainSailRCIn range {1900 +}  usec: 
                Sail relaxed. */
    // @bitmask: 5:reserved
    // @bitmask: 6:reserved
    // @bitmask: 7:Detect and get out of "in Irons" in AUTO mode
    // @User: Advanced
     AP_GROUPINFO("OPTIONS", 10, Sailboat, options, 0),
1 Like

Looks good to me. - — - - -

1 Like

Looks like param_parse.py is the parser.

I guess there could be other parsers though? …

On ArduPilot, we got only this one I think (or maybe MissionPlanner got its own?) but this shouldn’t be a blocker
I would agree to have this multiline parameters comments too
@peterbarker any opinon?

Hello @khancyr do you read your github e-mail?

Looks to me like just needs to add a multiline comment regex after param_parse.py line 49 and maybe next line too…

Also need to redo the above regex to capture multiline comments, which is a bit more long-winded