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

Add support to more (all?) ardupilot serial boards #3025

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Dec 9, 2024

I'm treating this a side-quest as I progress on my KakuteH7 plane

This should add support to all ardupilot boards

TODO:

  • generate boards.json on CI

@Williangalvani Williangalvani force-pushed the all_boards branch 2 times, most recently from 0305c9e to d54ee21 Compare January 9, 2025 13:53
@Williangalvani Williangalvani marked this pull request as ready for review January 9, 2025 13:53
@Williangalvani Williangalvani force-pushed the all_boards branch 4 times, most recently from dae4a7a to 619e3b4 Compare January 9, 2025 15:34
@@ -16,13 +16,355 @@
from typedefs import FirmwareFormat, FlightController, Platform, PlatformType


def get_board_id(platform: Platform) -> int:
def get_board_id(board: Union[FlightController, str]) -> int:
print(board)
Copy link
Member

Choose a reason for hiding this comment

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

lost debug code

ardupilot_board_ids = {
Platform.Pixhawk1: 9,
Platform.Pixhawk4: 50,
Platform.Pixhawk6X: 53,
Platform.Pixhawk6C: 56,
Platform.CubeOrange: 140,
"PX4_FMU_V1": 5,
Copy link
Member

Choose a reason for hiding this comment

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

We should refactor typedefs.Platform no ? It would be nice to unify both implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

We can, yes. I was trying to not touch stuff that currently works.
We could leave this PR for after 1.4 and then I can rework it to unify everything.

print(f"Total platform mappings: {platform_count}")
return

# If file is invalid or too old, download and process new data
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 doesnt look like we are checking the age of the file anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants