Skip to content

Commit 45567d5

Browse files
committed
fix formatting
1 parent 1851c43 commit 45567d5

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

include/depthai/pipeline/datatype/ImgDetections.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct ImgDetection {
146146
*/
147147
class ImgDetections : public ImgDetectionsT<ImgDetection>, public ProtoSerializable {
148148
public:
149-
virtual ~ImgDetections() override;
149+
virtual ~ImgDetections() override;
150150
using Base = ImgDetectionsT<dai::ImgDetection>;
151151
using Base::Base;
152152
using Base::detections;

src/pipeline/datatype/ImgDetections.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ namespace dai {
1919

2020
// ImgDetection functions
2121

22-
2322
ImgDetection::ImgDetection(const dai::RotatedRect& boundingBox, float conf = 0.f, uint32_t label = 0) {
2423
setBoundingBox(boundingBox);
2524
this->confidence = conf;
2625
this->label = label;
2726
}
2827
ImgDetection::ImgDetection(const dai::RotatedRect& boundingBox, std::string labelName, float conf = 0.f, uint32_t label = 0)
29-
: ImgDetection(boundingBox, conf, label) {
28+
: ImgDetection(boundingBox, conf, label) {
3029
this->labelName = std::move(labelName);
3130
}
3231

3332
ImgDetection::ImgDetection(const dai::RotatedRect& boundingBox, const dai::KeypointsList& keypoints, float conf = 0.f, uint32_t label = 0)
34-
: ImgDetection(boundingBox, conf, label) {
33+
: ImgDetection(boundingBox, conf, label) {
3534
this->keypoints = keypoints;
3635
}
3736

@@ -44,7 +43,7 @@ ImgDetection::ImgDetection(
4443

4544
void ImgDetection::setBoundingBox(const RotatedRect boundingBox) {
4645
this->boundingBox = boundingBox;
47-
46+
4847
std::array<float, 4> outerPoints = this->boundingBox->getOuterRect();
4948
xmin = outerPoints[0];
5049
ymin = outerPoints[1];
@@ -58,7 +57,7 @@ RotatedRect ImgDetection::getBoundingBox() const {
5857
} else if(xmin == 0.f && xmax == 0.f && ymin == 0.f && ymax == 0.f) {
5958
throw std::runtime_error("All bounding box values are zero, no bounding box can be built.");
6059
}
61-
60+
6261
// construct from legacy values
6362
RotatedRect rect = RotatedRect{dai::Rect{Point2f{xmin, ymin}, Point2f{xmax, ymax}}};
6463
return rect;
@@ -69,10 +68,10 @@ void ImgDetection::setOuterBoundingBox(const float xmin, const float ymin, const
6968
this->ymin = ymin;
7069
this->xmax = xmax;
7170
this->ymax = ymax;
72-
71+
7372
Point2f topLeft{xmin, ymin};
7473
Point2f bottomRight{xmax, ymax};
75-
74+
7675
this->boundingBox = RotatedRect{Rect{topLeft, bottomRight}};
7776
}
7877

src/remote_connection/RemoteConnectionImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ bool RemoteConnectionImpl::initWebsocketServer(const std::string& address, uint1
121121

122122
// Server options
123123
foxglove::ServerOptions serverOptions;
124-
serverOptions.sendBufferPriorityLimitMessages = {{0, 3}, {1, 5}}; // 3 messages for low priority, 5 messages for high priority
124+
serverOptions.sendBufferPriorityLimitMessages = {{0, 3}, {1, 5}}; // 3 messages for low priority, 5 messages for high priority
125125
serverOptions.messageDropPolicy = foxglove::MessageDropPolicy::MAX_MESSAGE_COUNT;
126126
serverOptions.capabilities.emplace_back("services");
127127
serverOptions.supportedEncodings.emplace_back("json");

tests/src/ondevice_tests/pipeline/node/spatial_location_calculator_test.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#include <catch2/catch_all.hpp>
2-
31
#include <array>
2+
#include <catch2/catch_all.hpp>
43
#include <cstdint>
54
#include <cstring>
65
#include <vector>
@@ -106,7 +105,6 @@ TEST_CASE("SpatialLocationCalculator synthetic depth data test") {
106105
auto outputQueue = spatial->out.createOutputQueue();
107106
auto passthroughQueue = spatial->passthroughDepth.createOutputQueue();
108107

109-
110108
std::vector<std::uint16_t> depthPixels(width * height, 1000);
111109
auto setRegionDepth = [&](const RoiSpec& spec) {
112110
const int x0 = static_cast<int>(spec.roi.x);
@@ -120,7 +118,7 @@ TEST_CASE("SpatialLocationCalculator synthetic depth data test") {
120118
for(const auto& spec : roiSpecs) {
121119
setRegionDepth(spec);
122120
}
123-
121+
124122
// Prepare synthetic depth frame
125123
auto depthFrame = std::make_shared<dai::ImgFrame>();
126124
depthFrame->setType(dai::ImgFrame::Type::RAW16);

0 commit comments

Comments
 (0)