Skip to content

Commit

Permalink
fix namespace in tests; fix datatype in cpm setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Kurzaj committed Sep 19, 2024
1 parent 5c557b9 commit fefb8a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ inline void setMeasurementDeltaTimeOfPerceivedObject(PerceivedObject& object, co
* @param value Value to set in cm
* @param confidence Confidence to set cm (optional)
*/
inline void setCartesianCoordinateWithConfidence(CartesianCoordinateWithConfidence& coordinate, const int32_t value,
inline void setCartesianCoordinateWithConfidence(CartesianCoordinateWithConfidence& coordinate, const int16_t value,
const uint16_t confidence = CoordinateConfidence::UNAVAILABLE) {
// limit value range
int32_t limited_value = std::max(CartesianCoordinateLarge::NEGATIVE_OUT_OF_RANGE,
int16_t limited_value = std::max(CartesianCoordinateLarge::NEGATIVE_OUT_OF_RANGE,
std::min(CartesianCoordinateLarge::POSITIVE_OUT_OF_RANGE, value));
coordinate.value.value = limited_value;

Expand Down
2 changes: 1 addition & 1 deletion etsi_its_msgs_utils/test/impl/test_cpm_ts_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST(etsi_its_cpm_ts_msgs, test_set_get_cpm) {
EXPECT_NEAR(longitude, cpm_ts_access::getLongitude(cpm), 1e-7);
EXPECT_NEAR(altitude, cpm_ts_access::getAltitude(cpm), 1e-2);

etsi_its_cpm_ts_msgs::msg::PerceivedObject object;
cpm_ts_msgs::PerceivedObject object;
gm::Vector3 dimensions;
dimensions.x = randomDouble(0.1, 25.6);
dimensions.y = randomDouble(0.1, 25.6);
Expand Down

0 comments on commit fefb8a4

Please sign in to comment.