Browse Source

Sub: pass loop rate to perf_info

master
Andrew Tridgell 7 years ago
parent
commit
58dfca8ccd
  1. 4
      ArduSub/ArduSub.cpp

4
ArduSub/ArduSub.cpp

@ -90,7 +90,7 @@ void Sub::setup()
scheduler.init(&scheduler_tasks[0], ARRAY_SIZE(scheduler_tasks)); scheduler.init(&scheduler_tasks[0], ARRAY_SIZE(scheduler_tasks));
// setup initial performance counters // setup initial performance counters
perf_info.reset(); perf_info.reset(scheduler.get_loop_rate_hz());
fast_loopTimer = AP_HAL::micros(); fast_loopTimer = AP_HAL::micros();
} }
@ -108,7 +108,7 @@ void Sub::perf_update(void)
(unsigned long)perf_info.get_avg_time(), (unsigned long)perf_info.get_avg_time(),
(unsigned long)perf_info.get_stddev_time()); (unsigned long)perf_info.get_stddev_time());
} }
perf_info.reset(); perf_info.reset(scheduler.get_loop_rate_hz());
pmTest1 = 0; pmTest1 = 0;
} }

Loading…
Cancel
Save