mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 21:43:34 +08:00
fw l1 controller: added a flag to indicate if navigation has updated
- can be used to check if l1 controller ran during a cycle Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Silvan Fuhrer
parent
e2f048f608
commit
ae5d3103f4
@@ -203,6 +203,10 @@ public:
|
||||
*/
|
||||
void set_dt(float dt) { _dt = dt;}
|
||||
|
||||
void reset_has_guidance_updated() { _has_guidance_updated = false; }
|
||||
|
||||
bool has_guidance_updated() { return _has_guidance_updated; }
|
||||
|
||||
private:
|
||||
|
||||
float _lateral_accel{0.0f}; ///< Lateral acceleration setpoint in m/s^2
|
||||
@@ -224,6 +228,9 @@ private:
|
||||
float _roll_slew_rate{0.0f}; ///< roll angle setpoint slew rate limit in rad/s
|
||||
float _dt{0}; ///< control loop time in seconds
|
||||
|
||||
bool _has_guidance_updated =
|
||||
false; ///< this flag is set to true by any of the guidance methods. This flag has to be manually reset using has_guidance_updated_reset()
|
||||
|
||||
/**
|
||||
* Convert a 2D vector from WGS84 to planar coordinates.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user