Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos in the SetVelocityVehicle function #204

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,15 @@
constexpr uint8_t VELOCITY_VEHICLE_LENGTH = 28;
const int VELOCITY_VEHICLE_UDP_SIZE = 36;

VelocityVehiclePacket steering_angle_front_axle_packet{};
VelocityVehiclePacket velocity_vehicle_packet{};

Check warning on line 451 in nebula_hw_interfaces/src/nebula_continental_hw_interfaces/continental_ars548_hw_interface.cpp

View check run for this annotation

Codecov / codecov/patch

nebula_hw_interfaces/src/nebula_continental_hw_interfaces/continental_ars548_hw_interface.cpp#L451

Added line #L451 was not covered by tests
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
Loading