Browse Source

SITL: change ADSB_VEHICLE update rate to 1Hz instead of 2Hz to match PING behavior

mission-4.1.18
Tom Pittenger 9 years ago
parent
commit
c3b241ca88
  1. 2
      libraries/SITL/SIM_ADSB.cpp
  2. 2
      libraries/SITL/SIM_ADSB.h

2
libraries/SITL/SIM_ADSB.cpp

@ -187,7 +187,7 @@ void ADSB::send_report(void) @@ -187,7 +187,7 @@ void ADSB::send_report(void)
send a ADSB_VEHICLE messages
*/
uint32_t now_us = AP_HAL::micros();
if (now_us - last_report_us > reporting_period_ms*1000UL) {
if (now_us - last_report_us >= reporting_period_ms*1000UL) {
for (uint8_t i=0; i<num_vehicles; i++) {
ADSB_Vehicle &vehicle = vehicles[i];
Location loc = home;

2
libraries/SITL/SIM_ADSB.h

@ -57,7 +57,7 @@ private: @@ -57,7 +57,7 @@ private:
ADSB_Vehicle vehicles[num_vehicles_MAX];
// reporting period in ms
const float reporting_period_ms = 500;
const float reporting_period_ms = 1000;
uint32_t last_report_us = 0;
uint32_t last_update_us = 0;

Loading…
Cancel
Save