Skip to content

Commit

Permalink
mavlink: use static_cast instead of C-style cast
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes authored and bkueng committed Apr 28, 2020
1 parent 18b3954 commit 06f4004
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,10 +1780,10 @@ MavlinkReceiver::handle_message_play_tune(mavlink_message_t *msg)

while (tunes.get_next_note(frequency, duration, silence, volume) > 0) {
tune_control.tune_id = 0;
tune_control.frequency = (uint16_t)frequency;
tune_control.duration = (uint32_t)duration;
tune_control.silence = (uint32_t)silence;
tune_control.volume = (uint8_t)volume;
tune_control.frequency = static_cast<uint16_t>(frequency);
tune_control.duration = static_cast<uint32_t>(duration);
tune_control.silence = static_cast<uint32_t>(silence);
tune_control.volume = static_cast<uint8_t>(volume);
tune_control.timestamp = hrt_absolute_time();
_tune_control_pub.publish(tune_control);

Expand Down

0 comments on commit 06f4004

Please sign in to comment.