Skip to content

Commit

Permalink
fix wrong data type in cpm setters
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbusch committed Oct 10, 2024
1 parent 5feb424 commit 01199c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ inline void setMeasurementDeltaTimeOfPerceivedObject(PerceivedObject& object, co
* @param value The value to be set in centimeters.
* @param confidence The confidence to be set in centimeters (default: CoordinateConfidence::UNAVAILABLE).
*/
inline void setCartesianCoordinateWithConfidence(CartesianCoordinateWithConfidence& coordinate, const int16_t value,
inline void setCartesianCoordinateWithConfidence(CartesianCoordinateWithConfidence& coordinate, const int32_t value,
const uint16_t confidence = CoordinateConfidence::UNAVAILABLE) {
// limit value range
int16_t limited_value = std::max(CartesianCoordinateLarge::NEGATIVE_OUT_OF_RANGE,
int32_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

0 comments on commit 01199c9

Please sign in to comment.