From 09eb23fc3a8b5deff34542c1e69097a302806316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20K=C3=BCppers?= Date: Fri, 3 Jan 2025 17:08:18 +0100 Subject: [PATCH] SpeedValue is of type uint16, adapt setter accordingly --- .../include/etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h index b09dc003..1b28c675 100644 --- a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h +++ b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h @@ -114,7 +114,7 @@ inline void setAltitude(Altitude& altitude, const double value) { * @param value SpeedValue in m/s as decimal number */ inline void setSpeedValue(SpeedValue& speed, const double value) { - int64_t speed_val = (int64_t)std::round(value * 1e2); + uint16_t speed_val = (uint16_t)std::round(value * 1e2); throwIfOutOfRange(speed_val, SpeedValue::MIN, SpeedValue::MAX, "SpeedValue"); speed.value = speed_val; }