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

CANManager, Mount, OpticalFlow, Proximity, SerialManager: alphabetise protocol and type param values #29075

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Jan 15, 2025

This makes a small improvement in user usability by alphabetising the _PROTOCOL and _TYPE values displayed to users in GCS drop-downs. This does not affect the order displayed in the wiki pages

This change has been tested by running, "./Tools/autotest/autotest.py build.Copter test.Copter.Parameters" and reviewing the output of the "buildlogs/apm.pdef.xml" file before and after.

The only downside of this change is perhaps that sometimes the most common items are no longer near the top. So for example, with the SERIALx_PROTOCOL parameter, MAVLink2 is in the middle instead of at the top. If we think this is an issue then I'm happy to manually resort them. Personally I think the purely alphabetical order is fine but I don't feel strongly about it

Below are the changes found:

  • CAN_D1_PROTOCOL, CAN_D2_PROTOCOL

        <value code="0">Disabled</value>
        <value code="11">Benewake</value>
        <value code="1">DroneCAN</value>
        <value code="6">EFI_NWPMU</value>
        <value code="8">KDECAN</value>
        <value code="14">NanoRadar</value>
        <value code="4">PiccoloCAN</value>
        <value code="10">Scripting</value>
        <value code="12">Scripting2</value>
        <value code="13">TOFSenseP</value>
        <value code="7">USD1</value>
    
  • CAN_D1_PROTOCOL2, CAN_D3_PROTOCOL

        <value code="0">Disabled</value>
        <value code="11">Benewake</value>
        <value code="14">NanoRadar</value>
        <value code="10">Scripting</value>
        <value code="12">Scripting2</value>
        <value code="13">TOFSenseP</value>
        <value code="7">USD1</value>
    
  • FLOW_TYPE

        <value code="0">None</value>
        <value code="3">Bebop</value>
        <value code="4">CXOF</value>
        <value code="6">DroneCAN</value>
        <value code="5">MAVLink</value>
        <value code="7">MSP</value>
        <value code="1">PX4Flow</value>
        <value code="2">Pixart</value>
        <value code="8">UPFLOW</value>
    
  • MNT1_TYPE, MNT2_TYPE

        <value code="0">None</value>
        <value code="2">3DR Solo</value>
        <value code="3">Alexmos Serial</value>
        <value code="7">BrushlessPWM</value>
        <value code="13">CADDX</value>
        <value code="6">Gremsy</value>
        <value code="4">SToRM32 MAVLink</value>
        <value code="5">SToRM32 Serial</value>
        <value code="9">Scripting</value>
        <value code="1">Servo</value>
        <value code="8">Siyi</value>
        <value code="12">Topotek</value>
        <value code="11">Viewpro</value>
        <value code="10">Xacti</value>
    
  • PRX1_TYPE, PRX2_TYPE, PRX3_TYPE, PRX4_TYPE

        <value code="0">None</value>
        <value code="12">AirSimSITL</value>
        <value code="13">CygbotD1</value>
        <value code="14">DroneCAN</value>
        <value code="16">LD06</value>
        <value code="7">LightwareSF40c</value>
        <value code="8">LightwareSF45B</value>
        <value code="2">MAVLink</value>
        <value code="17">MR72_CAN</value>
        <value code="5">RPLidarA2</value>
        <value code="4">RangeFinder</value>
        <value code="10">SITL</value>
        <value code="15">Scripting</value>
        <value code="3">TeraRangerTower</value>
        <value code="6">TeraRangerTowerEvo</value>
    
  • CAN_D1_UC_S1_PRO, CAN_D1_UC_S2_PRO, CAN_D1_UC_S3_PRO, CAN_D2_UC_S1_PRO, CAN_D2_UC_S2_PRO, CAN_D2_UC_S3_PRO, CAN_D3_UC_S1_PRO, CAN_D3_UC_S2_PRO, CAN_D3_UC_S3_PRO, NET_P1_PROTOCOL, NET_P2_PROTOCOL, NET_P3_PROTOCOL, NET_P4_PROTOCOL, SCR_SDEV1_PROTO, SCR_SDEV2_PROTO, SCR_SDEV3_PROTO, SERIAL1_PROTOCOL, SERIAL1_PROTOCOL, SERIAL2_PROTOCOL, SERIAL3_PROTOCOL, SERIAL4_PROTOCOL, SERIAL5_PROTOCOL, SERIAL6_PROTOCOL, SERIAL7_PROTOCOL, SERIAL8_PROTOCOL, SERIAL9_PROTOCOL

        <value code="-1">None</value>
        <value code="35">ADSB</value>
        <value code="36">AHRS</value>
        <value code="40">AIS</value>
        <value code="34">AirSpeed</value>
        <value code="7">Alexmos Gimbal Serial</value>
        <value code="13">Beacon</value>
        <value code="41">CoDevESC</value>
        <value code="29">Crossfire VTX</value>
        <value code="45">DDS XRCE</value>
        <value code="33">DJI FPV</value>
        <value code="17">Devo Telemetry</value>
        <value code="42">DisplayPort</value>
        <value code="24">EFI Serial</value>
        <value code="16">ESC Telemetry</value>
        <value code="38">FETtecOneWire</value>
        <value code="10">FrSky SPort Passthrough (OpenTX)</value>
        <value code="3">Frsky D</value>
        <value code="4">Frsky SPort</value>
        <value code="5">GPS</value>
        <value code="30">Generator</value>
        <value code="8">Gimbal</value>
        <value code="27">HottTelem</value>
        <value code="46">IMUDATA</value>
        <value code="44">IRC Tramp</value>
        <value code="25">LTM</value>
        <value code="11">Lidar360</value>
        <value code="43">MAVLink High Latency</value>
        <value code="1">MAVLink1</value>
        <value code="2">MAVLink2</value>
        <value code="32">MSP</value>
        <value code="20">NMEA Output</value>
        <value code="18">OpticalFlow</value>
        <value code="48">PPP</value>
        <value code="23">RCIN</value>
        <value code="9">Rangefinder</value>
        <value code="19">RobotisServo</value>
        <value code="26">RunCam</value>
        <value code="15">SBus servo out</value>
        <value code="22">SLCAN</value>
        <value code="28">Scripting</value>
        <value code="37">SmartAudio</value>
        <value code="39">Torqeedo</value>
        <value code="14">Volz servo out</value>
        <value code="31">Winch</value>
        <value code="21">WindVane</value>
    

Note: the parameter sorting feature doesn't appear to work with GPS1_TYPE and GPS2_TYPE so I've removed that change from the PR

@rmackay9 rmackay9 force-pushed the serial-param-desc-alpha branch from 68a04ea to 3d3153c Compare January 15, 2025 01:42
@rmackay9 rmackay9 changed the title CANManager, GPS, Mount, OpticalFlow, Proximity, SerialManager: alphabetise protocol and type param values CANManager, Mount, OpticalFlow, Proximity, SerialManager: alphabetise protocol and type param values Jan 15, 2025
Copy link
Contributor

@timtuxworth timtuxworth left a comment

Choose a reason for hiding this comment

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

I think this is excellent!

@rmackay9 rmackay9 merged commit 8c2f599 into ArduPilot:master Jan 15, 2025
99 checks passed
@rmackay9
Copy link
Contributor Author

Thanks very much for the approvals (I've interpreted's PeterB's "MergeOnCIPass" as an approval).

@rmackay9 rmackay9 deleted the serial-param-desc-alpha branch January 15, 2025 05:57
@Hwurzburg
Copy link
Collaborator

I personally am a bit fused that the CAN first driver protocols do not still have DroneCAN as the first item, since that is most common now and only one seen in the MP dropdown until expanded.....

@rmackay9
Copy link
Contributor Author

Hi @Hwurzburg, thanks for the feedback and apologies if I merged this too quickly. I'll go back and see if a manual re-order works better

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.

4 participants