Skip to content

Commit

Permalink
SpeedValue is of type uint16, adapt setter accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
gkueppers committed Jan 3, 2025
1 parent fc81692 commit 09eb23f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09eb23f

Please sign in to comment.