mirror of https://github.com/ArduPilot/ardupilot
Rover: call stats set_flying from 1Hz loop
This commit is contained in:
parent
9d7c8277a4
commit
99f12d66ff
|
@ -293,17 +293,6 @@ void Rover::nav_script_time_done(uint16_t id)
|
||||||
}
|
}
|
||||||
#endif // AP_SCRIPTING_ENABLED
|
#endif // AP_SCRIPTING_ENABLED
|
||||||
|
|
||||||
#if AP_STATS_ENABLED
|
|
||||||
/*
|
|
||||||
update AP_Stats
|
|
||||||
*/
|
|
||||||
void Rover::stats_update(void)
|
|
||||||
{
|
|
||||||
AP::stats()->set_flying(g2.motors.active());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// update AHRS system
|
// update AHRS system
|
||||||
void Rover::ahrs_update()
|
void Rover::ahrs_update()
|
||||||
{
|
{
|
||||||
|
@ -468,6 +457,11 @@ void Rover::one_second_loop(void)
|
||||||
g2.wp_nav.set_turn_params(g2.turn_radius, g2.motors.have_skid_steering());
|
g2.wp_nav.set_turn_params(g2.turn_radius, g2.motors.have_skid_steering());
|
||||||
g2.pos_control.set_turn_params(g2.turn_radius, g2.motors.have_skid_steering());
|
g2.pos_control.set_turn_params(g2.turn_radius, g2.motors.have_skid_steering());
|
||||||
g2.wheel_rate_control.set_notch_sample_rate(AP::scheduler().get_filtered_loop_rate_hz());
|
g2.wheel_rate_control.set_notch_sample_rate(AP::scheduler().get_filtered_loop_rate_hz());
|
||||||
|
|
||||||
|
#if AP_STATS_ENABLED
|
||||||
|
// Update stats "flying" time
|
||||||
|
AP::stats()->set_flying(g2.motors.active());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rover::update_current_mode(void)
|
void Rover::update_current_mode(void)
|
||||||
|
|
|
@ -285,7 +285,6 @@ private:
|
||||||
bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2, int16_t &arg3, int16_t &arg4) override;
|
bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2, int16_t &arg3, int16_t &arg4) override;
|
||||||
void nav_script_time_done(uint16_t id) override;
|
void nav_script_time_done(uint16_t id) override;
|
||||||
#endif // AP_SCRIPTING_ENABLED
|
#endif // AP_SCRIPTING_ENABLED
|
||||||
void stats_update();
|
|
||||||
void ahrs_update();
|
void ahrs_update();
|
||||||
void gcs_failsafe_check(void);
|
void gcs_failsafe_check(void);
|
||||||
void update_logging1(void);
|
void update_logging1(void);
|
||||||
|
|
Loading…
Reference in New Issue