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

boards: bluerobotics: navigator: Add initial support #24018

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

Conversation

JoaoMario109
Copy link
Contributor

Add initial support for Blue Robotics Navigator Flight Controller board.

Solved Problem

Currently there is no support for the Blue Robotics Navigator Flight Controller board.

Solution

  • Add CLI option for ADS1115 driver to allow bypass Config Reg Check in cases where initial state may be unknown. Since in a Linux board the flight controller can be restarted without resetting ADS1115 to initial state.
  • Add initial support for Blue Robotics Navigator Flight Controller board.

Changelog Entry

For release notes:

  • Feature: Add CLI option for ADS1115 driver to allow bypass Config Reg Check in cases where initial state may be unknown.
  • Feature: Add initial support for the Blue Robotics Navigator Flight Controller board

Alternatives

Do not support Navigator Flight Controller board.

Test coverage

  • Initial tests were made in real hardware using a raspberry PI 4 with BlueOS
  • Calibration of sensors were made using QGC

Context

Navigator Flight Controller
Navigator Hardware Setup
Navigator Schematic

@JoaoMario109 JoaoMario109 force-pushed the add-bluerobotics-navigator-support branch from b610b94 to ba03f57 Compare November 21, 2024 19:31
@@ -70,6 +70,11 @@ int ADS1115::probe()
return ret;
}

// In flight controllers that operates with multiple autopilots the initial state may be unknown.
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively we could tolerate checking for other known configurations.

Copy link
Contributor Author

@JoaoMario109 JoaoMario109 Nov 22, 2024

Choose a reason for hiding this comment

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

I am not entirely sure about this one, at least from what I know, the ADS1115 doesn't have a Who Am I or similar register to verify its identity. Additionally, the CONFIG register has a broad range of values and could be altered by other processes, especially on a Linux board when PX4 isn’t running. This makes it difficult to reliably determine what will be stored in the config register when PX4 is trying to connect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @dagar, just following up on the review regarding the ADS1115 configuration. I'd would like to know your thoughts when you have a moment. Thanks!

@@ -0,0 +1,94 @@
#!/bin/sh
. px4-alias.sh
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 really unify this with init with SITL and NuttX.

#------------------------------------------------------------------------------

# 1K + 4.7K
param set-default BAT1_V_DIV 5.7
Copy link
Member

Choose a reason for hiding this comment

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

With the way init is currently handled for these linux boards (posix-configs/rpi/navigator/sub.config) this isn't going to be called by default.

If you wanted to work towards that I'd suggest manually calling it yourself, and you could also add an rc.board_sensors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review and suggestions. Following your advice, I’ve moved the board-specific parts of the .config to the rc.* files. Additionally, I’ve created rc.board_sensors, as suggested, and rc.board_extras. Also I added their calls into the .config file.

@JoaoMario109 JoaoMario109 force-pushed the add-bluerobotics-navigator-support branch from ba03f57 to a11b19a Compare November 22, 2024 15:02
@JoaoMario109 JoaoMario109 requested a review from dagar December 2, 2024 14:48
@mrpollo mrpollo force-pushed the add-bluerobotics-navigator-support branch from a11b19a to 3723879 Compare December 5, 2024 17:49
@mrpollo
Copy link
Contributor

mrpollo commented Dec 5, 2024

FYI, I rebased this branch so it can pickup the latest CI changes and we can verify everything works as intended.

@mrpollo mrpollo force-pushed the add-bluerobotics-navigator-support branch from 3723879 to dca46f3 Compare December 12, 2024 16:18
* Add a CLI flag to allow bypass ADDRESSPOINTER_REG_CONFIG value check
  when probing since if ADC may have ben used prior it can and fail to
  match CONFIG_RESET_VALUE_HIGH and CONFIG_RESET_VALUE_LOW
@JoaoMario109 JoaoMario109 force-pushed the add-bluerobotics-navigator-support branch from dca46f3 to 6556feb Compare December 19, 2024 19:02
@patrickelectric
Copy link
Contributor

@mrpollo @dagar it appears that the CI issues are unrelated to the PR.

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

Successfully merging this pull request may close these issues.

4 participants