From 99b0a8e4bcce1face4f9bfd2a415859dce5584ef Mon Sep 17 00:00:00 2001 From: GuillaumeLaine Date: Tue, 27 Feb 2024 10:08:35 +0100 Subject: [PATCH] ci: check doxygen script works on PR and fix doxygen --- .github/workflows/doxygen-gh-pages.yml | 20 ++++++++++++++++++- .../include/px4_ros2/utils/geodesic.hpp | 8 ++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doxygen-gh-pages.yml b/.github/workflows/doxygen-gh-pages.yml index 99c909ba..b5fc7dba 100644 --- a/.github/workflows/doxygen-gh-pages.yml +++ b/.github/workflows/doxygen-gh-pages.yml @@ -5,9 +5,13 @@ on: branches: - main - doxygen + pull_request: + branches: + - "*" jobs: deploy: + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/doxygen' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -24,4 +28,18 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/html \ No newline at end of file + publish_dir: ./docs/html + + check-doxygen: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install Doxygen + run: sudo apt update && sudo apt install -y doxygen + + - name: Run Doxygen + run: ./scripts/run-doxygen.sh diff --git a/px4_ros2_cpp/include/px4_ros2/utils/geodesic.hpp b/px4_ros2_cpp/include/px4_ros2/utils/geodesic.hpp index 7b565a7d..e785ac88 100644 --- a/px4_ros2_cpp/include/px4_ros2/utils/geodesic.hpp +++ b/px4_ros2_cpp/include/px4_ros2/utils/geodesic.hpp @@ -224,7 +224,7 @@ static inline Eigen::Vector3f vectorToGlobalPosition( * * @param global_position_line_start line start lat [deg], lon [deg] * @param global_position_line_end line end lat [deg], lon [deg] - * @param dist distance [m] of target global position from position 'start' towards position 'end' (can be negative) + * @param dist_from_start distance [m] of target global position from position 'start' towards position 'end' (can be negative) * * @ingroup geodesic */ @@ -239,7 +239,7 @@ Eigen::Vector2d globalPositionFromLineAndDist( * * @param global_position_now current lat [deg], lon [deg] * @param heading heading from the current position [rad] (clockwise) - * @param distance distance from the current position [m] + * @param dist distance from the current position [m] * @return the target global position * * @ingroup geodesic @@ -254,7 +254,7 @@ Eigen::Vector2d globalPositionFromHeadingAndDist( * * @param global_position_now current lat [deg], lon [deg] * @param heading heading from the current position [rad] (clockwise) - * @param distance distance from the current position [m] + * @param dist distance from the current position [m] * @return the target global position * * @ingroup geodesic @@ -288,7 +288,7 @@ Eigen::Vector2d addVectorToGlobalPosition( * @brief Compute the global position from adding a local frame vector to the current global position. * * @param global_position current lat [deg], lon [deg], alt AMSL [m] - * @param vector_ne local vector to add [m^3] (NED) + * @param vector_ned local vector to add [m^3] (NED) * @return the resulting global position from the addition * * @ingroup geodesic