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

CommandCode: update list of available commands on MAV_CMD enum #995

Merged
merged 1 commit into from
Apr 9, 2018

Conversation

TSC21
Copy link
Member

@TSC21 TSC21 commented Apr 7, 2018

I used cog to get all the available commands from MAV_CMD enum, excluding:

  1. An exclusion list that includes 'SPATIAL', 'USER', 'WAYPOINT' user defined commands;
  2. Deprecated commands (by description inspection).
    This way, updating the command codes to be used by services.

Copy link
Member

@vooon vooon left a comment

Choose a reason for hiding this comment

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

Result looks ok, but remove CMD_ prefix. That may break scripts.

# for k, e in enum:
# enumt.extend(e.name[len(ename) + 1:].split('_')[0:1])
#
# enumt = sorted(list(OrderedDict.fromkeys(enumt)))
Copy link
Member

Choose a reason for hiding this comment

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

What this do?!

Copy link
Member Author

Choose a reason for hiding this comment

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

It removes the duplicates keys from enumt and then sorts them alphabetically.

@TSC21
Copy link
Member Author

TSC21 commented Apr 9, 2018

Result looks ok, but remove CMD_ prefix. That may break scripts.

Where do you see the CMD_ prefix on the enums?

@vooon
Copy link
Member

vooon commented Apr 9, 2018 via email

@vooon
Copy link
Member

vooon commented Apr 9, 2018 via email

@TSC21
Copy link
Member Author

TSC21 commented Apr 9, 2018

Use set()!

Done

@vooon vooon merged commit 5c2d8d0 into mavlink:master Apr 9, 2018
@vooon vooon added this to the Version 0.25 milestone Apr 9, 2018
@TSC21 TSC21 deleted the pr-cmd_update branch April 10, 2018 16:22
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.

2 participants