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

Fix missing constructor, cast type and add warnings #56

Merged
merged 3 commits into from
May 30, 2024
Merged
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
3 changes: 2 additions & 1 deletion fixposition_driver_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5)
project(fixposition_driver_lib VERSION 5.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wall -Wextra -Wpedantic -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic\
-Wshadow -Wunused-parameter -Wformat -Wpointer-arith")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ struct NavSatStatusData {
};
int8_t status;
uint16_t service;
NavSatStatusData() : status(static_cast<int8_t>(Status::STATUS_NO_FIX)), service(0) {}
};

struct NavSatFixData {
Expand Down
6 changes: 3 additions & 3 deletions fixposition_driver_lib/src/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ void BestGnssPosToNavSatFix(const Oem7MessageHeaderMem* const header, const BEST

switch (static_cast<PositionOrVelocityType>(bestgnsspos->pos_type)) {
case PositionOrVelocityType::NARROW_INT:
navsatfix.status.status = static_cast<uint8_t>(NavSatStatusData::Status::STATUS_GBAS_FIX);
navsatfix.status.status = static_cast<int8_t>(NavSatStatusData::Status::STATUS_GBAS_FIX);
break;
case PositionOrVelocityType::NARROW_FLOAT:
case PositionOrVelocityType::SINGLE:
navsatfix.status.status = static_cast<uint8_t>(NavSatStatusData::Status::STATUS_FIX);
navsatfix.status.status = static_cast<int8_t>(NavSatStatusData::Status::STATUS_FIX);
break;
default:
navsatfix.status.status = static_cast<uint8_t>(NavSatStatusData::Status::STATUS_NO_FIX);
navsatfix.status.status = static_cast<int8_t>(NavSatStatusData::Status::STATUS_NO_FIX);
}

// TODO hardcoded for now for all 4 systems
Expand Down
3 changes: 2 additions & 1 deletion fixposition_driver_ros1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5)
project(fixposition_driver_ros1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wall -Wextra -Wpedantic -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic\
-Wshadow -Wunused-parameter -Wformat -Wpointer-arith")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
3 changes: 2 additions & 1 deletion fixposition_driver_ros2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5)
project(fixposition_driver_ros2)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wall -Wextra -Wpedantic -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic\
-Wshadow -Wunused-parameter -Wformat -Wpointer-arith")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
3 changes: 2 additions & 1 deletion fixposition_odometry_converter_ros1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5)
project(fixposition_odometry_converter_ros1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wall -Wextra -Wpedantic -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic\
-Wshadow -Wunused-parameter -Wformat -Wpointer-arith")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
7 changes: 4 additions & 3 deletions fixposition_odometry_converter_ros2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.10.2)
project(fixposition_odometry_converter_ros2)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always -Wall -Wextra -Wpedantic -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic\
-Wshadow -Wunused-parameter -Wformat -Wpointer-arith")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand All @@ -27,7 +28,7 @@ include_directories(
)

# BUILD EXECUTABLE =====================================================================================================
add_library(odom_converter SHARED
add_library(odom_converter SHARED
src/params.cpp
src/odom_converter_node.cpp)
ament_target_dependencies(odom_converter ${PACKAGE_INCLUDE_DEPENDS})
Expand All @@ -49,4 +50,4 @@ install(DIRECTORY include
DESTINATION .
)

ament_package()
ament_package()
Loading