Browse Source

GCS_MAVLink: use correct type for streamrate values

mission-4.1.18
Peter Barker 6 years ago committed by Randy Mackay
parent
commit
b6ac20ce32
  1. 6
      libraries/GCS_MAVLink/GCS_Common.cpp

6
libraries/GCS_MAVLink/GCS_Common.cpp

@ -3844,11 +3844,11 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id) @@ -3844,11 +3844,11 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id)
uint16_t GCS_MAVLINK::get_interval_for_stream(GCS_MAVLINK::streams id) const
{
const float frate = streamRates[id].get();
if ((uint8_t)frate == 0) {
const int16_t frate = streamRates[id].get();
if (frate == 0) {
return 0;
}
const uint32_t ret = 1000/(uint8_t)frate;
const uint32_t ret = 1000/frate;
if (ret > 60000) {
return 60000;
}

Loading…
Cancel
Save