From e510bf8d0c402c4cd0152b54776d1763f02eae61 Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 4 Nov 2024 18:36:52 -0800 Subject: [PATCH] Fix formatting --- src/Constants.cpp | 12 ++++++------ src/Constants.h | 3 ++- src/camera/Camera.cpp | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Constants.cpp b/src/Constants.cpp index 3edb963d..27124699 100644 --- a/src/Constants.cpp +++ b/src/Constants.cpp @@ -51,13 +51,13 @@ const robot::types::CameraID MAST_CAMERA_ID = 40; const robot::types::CameraID WRIST_CAMERA_ID = 30; const robot::types::CameraID HAND_CAMERA_ID = 20; -constexpr frozen::unordered_map CAMERA_CONFIG_PATHS = { - {MAST_CAMERA_ID, "../camera-config/MastCameraCalibration.yml"}, - {WRIST_CAMERA_ID, "../camera-config/WristCameraCalibration.yml"}, - {HAND_CAMERA_ID, "../camera-config/HandCameraCalibration.yml"}}; +constexpr frozen::unordered_map + CAMERA_CONFIG_PATHS = {{MAST_CAMERA_ID, "../camera-config/MastCameraCalibration.yml"}, + {WRIST_CAMERA_ID, "../camera-config/WristCameraCalibration.yml"}, + {HAND_CAMERA_ID, "../camera-config/HandCameraCalibration.yml"}}; -constexpr frozen::unordered_map CAMERA_NAME_TO_ID = { - {"mast", MAST_CAMERA_ID}, {"wrist", WRIST_CAMERA_ID}, {"hand", HAND_CAMERA_ID}}; +constexpr frozen::unordered_map CAMERA_NAME_TO_ID = + {{"mast", MAST_CAMERA_ID}, {"wrist", WRIST_CAMERA_ID}, {"hand", HAND_CAMERA_ID}}; /** @deprecated No need for this constant once we fully switch over the Mission Control PlanViz diff --git a/src/Constants.h b/src/Constants.h index f2bf9dd7..20ad359e 100644 --- a/src/Constants.h +++ b/src/Constants.h @@ -59,7 +59,8 @@ extern const robot::types::CameraID HAND_CAMERA_ID; extern const frozen::unordered_map CAMERA_CONFIG_PATHS; -extern const frozen::unordered_map CAMERA_NAME_TO_ID; +extern const frozen::unordered_map + CAMERA_NAME_TO_ID; extern const uint16_t WS_SERVER_PORT; diff --git a/src/camera/Camera.cpp b/src/camera/Camera.cpp index 54ddfb5e..046f4232 100644 --- a/src/camera/Camera.cpp +++ b/src/camera/Camera.cpp @@ -62,7 +62,8 @@ void Camera::init() { } std::stringstream Camera::GStreamerFromFile(robot::types::CameraID camera_id) { - cv::FileStorage fs(Constants::CAMERA_CONFIG_PATHS.at(camera_id).data(), cv::FileStorage::READ); + cv::FileStorage fs(Constants::CAMERA_CONFIG_PATHS.at(camera_id).data(), + cv::FileStorage::READ); if (!fs.isOpened()) { throw std::invalid_argument("Configuration file of camera ID" + std::to_string(camera_id) + " does not exist");