Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Code Formatter
on:
push:
pull_request:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
with:
branch: ${{ github.event.pull_request.head.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ inputs:
description: 'The commit message used when changes need to be committed'
required: false
default: 'style: Applied ROS C++ Style Guide'
branch:
description: 'The branch the changes will be committed.'
required: false
default: 'None'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.author-name }}
- ${{ inputs.author-email }}
- ${{ inputs.commit-message }}
- ${{ inputs.branch }}
10 changes: 8 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name=$1
email=$2
message=$3
branch=$4

apt-get update
apt-get install -y curl
Expand Down Expand Up @@ -47,9 +48,14 @@ if [[ $? == 0 ]] ;then

git config --global user.email "$email"
git config --global user.name "$name"
git config --global push.default current
if [[ $branch == "None" ]];then
branch=$(git rev-parse --abbrev-ref HEAD)
fi
git commit -a -m "$message"
git push

echo "Pushing to $GITHUB_REF"

git push origin HEAD:"$GITHUB_REF"
else
echo "No changes to commit"
fi
5 changes: 2 additions & 3 deletions test/dji_sdk_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ DJISDKNode::DJISDKNode(ros::NodeHandle& nh, ros::NodeHandle& nh_private)
: telemetry_from_fc(USE_BROADCAST)
, R_FLU2FRD(tf::Matrix3x3(1, 0, 0, 0, -1, 0, 0, 0, -1))
, R_ENU2NED(tf::Matrix3x3(0, 1, 0, 1, 0, 0, 0, 0, -1))
, curr_align_state(UNALIGNED)
{
, curr_align_state(UNALIGNED){
nh_private.param("serial_name", serial_device, std::string("/dev/ttyUSB0"));
nh_private.param("baud_rate", baud_rate, 921600);
nh_private.param("app_id", app_id, 123456);
Expand All @@ -41,7 +40,7 @@ DJISDKNode::DJISDKNode(ros::NodeHandle& nh, ros::NodeHandle& nh_private)
// @todo need some error handling for init functions
//! @note parsing launch file to get environment parameters
if (!initVehicle(nh_private))
{
{
ROS_ERROR("Vehicle initialization failed");
}

Expand Down