Skip to content

Commit

Permalink
chore: fix typos in the SetVelocity Vehicle function (tier4#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKrug authored and mojomex committed Oct 2, 2024
1 parent a82e96a commit 6a457fd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,15 @@ Status ContinentalARS548HwInterface::set_velocity_vehicle(float velocity_kmh)
constexpr uint8_t velocity_vehicle_length = 28;
const int velocity_vehicle_udp_size = 36;

VelocityVehiclePacket steering_angle_front_axle_packet{};
VelocityVehiclePacket velocity_vehicle_packet{};
static_assert(sizeof(VelocityVehiclePacket) == velocity_vehicle_udp_size);
steering_angle_front_axle_packet.header.service_id = velocity_vehicle_service_id;
steering_angle_front_axle_packet.header.method_id = velocity_vehicle_method_id;
steering_angle_front_axle_packet.header.length = velocity_vehicle_length;
steering_angle_front_axle_packet.velocity_vehicle = velocity_kmh;
velocity_vehicle_packet.header.service_id = velocity_vehicle_service_id;
velocity_vehicle_packet.header.method_id = velocity_vehicle_method_id;
velocity_vehicle_packet.header.length = velocity_vehicle_length;
velocity_vehicle_packet.velocity_vehicle = velocity_kmh;

std::vector<uint8_t> send_vector(sizeof(VelocityVehiclePacket));
std::memcpy(send_vector.data(), &steering_angle_front_axle_packet, sizeof(VelocityVehiclePacket));
std::memcpy(send_vector.data(), &velocity_vehicle_packet, sizeof(VelocityVehiclePacket));

if (!sensor_udp_driver_ptr_->sender()->isOpen()) {
return Status::ERROR_1;
Expand Down

0 comments on commit 6a457fd

Please sign in to comment.