PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <hysteresis.h>
Public Member Functions | |
Hysteresis (bool init_state) | |
Hysteresis ()=delete | |
~Hysteresis ()=default | |
bool | get_state () const |
void | set_hysteresis_time_from (const bool from_state, const hrt_abstime new_hysteresis_time_us) |
void | set_state_and_update (const bool new_state, const hrt_abstime &now_us) |
void | update (const hrt_abstime &now_us) |
Private Attributes | |
hrt_abstime | _last_time_to_change_state {0} |
hrt_abstime | _time_from_true_us {0} |
hrt_abstime | _time_from_false_us {0} |
bool | _state |
bool | _requested_state |
Definition at line 49 of file hysteresis.h.
|
inlineexplicit |
Definition at line 52 of file hysteresis.h.
References Hysteresis(), and ~Hysteresis().
|
delete |
|
default |
|
inline |
Definition at line 60 of file hysteresis.h.
References _state, hrt_abstime, set_hysteresis_time_from(), set_state_and_update(), and update().
Referenced by land_detector::MulticopterLandDetector::_get_landed_state(), land_detector::MulticopterLandDetector::_get_maybe_landed_state(), ObstacleAvoidance::checkAvoidanceProgress(), MulticopterPositionControl::failsafe(), ObstacleAvoidance::injectAvoidanceSetpoints(), Commander::run(), land_detector::LandDetector::Run(), TEST(), FailureDetector::updateAttitudeStatus(), and Takeoff::updateTakeoffState().
void systemlib::Hysteresis::set_hysteresis_time_from | ( | const bool | from_state, |
const hrt_abstime | new_hysteresis_time_us | ||
) |
Definition at line 46 of file hysteresis.cpp.
References _time_from_false_us, and _time_from_true_us.
Referenced by land_detector::MulticopterLandDetector::_update_params(), Commander::Commander(), land_detector::FixedwingLandDetector::FixedwingLandDetector(), get_state(), land_detector::MulticopterLandDetector::MulticopterLandDetector(), MulticopterPositionControl::MulticopterPositionControl(), ObstacleAvoidance::ObstacleAvoidance(), Commander::run(), TEST(), and FailureDetector::updateAttitudeStatus().
void systemlib::Hysteresis::set_state_and_update | ( | const bool | new_state, |
const hrt_abstime & | now_us | ||
) |
Definition at line 57 of file hysteresis.cpp.
References _last_time_to_change_state, _requested_state, _state, and update().
Referenced by land_detector::LandDetector::_update_state(), ObstacleAvoidance::checkAvoidanceProgress(), MulticopterPositionControl::failsafe(), get_state(), ObstacleAvoidance::injectAvoidanceSetpoints(), Commander::run(), MulticopterPositionControl::Run(), TEST(), FailureDetector::updateAttitudeStatus(), and Takeoff::updateTakeoffState().
void systemlib::Hysteresis::update | ( | const hrt_abstime & | now_us | ) |
Definition at line 73 of file hysteresis.cpp.
References _last_time_to_change_state, _requested_state, _state, _time_from_false_us, _time_from_true_us, and hrt_abstime.
Referenced by get_state(), set_state_and_update(), and TEST().
|
private |
Definition at line 70 of file hysteresis.h.
Referenced by set_state_and_update(), and update().
|
private |
Definition at line 76 of file hysteresis.h.
Referenced by set_state_and_update(), and update().
|
private |
Definition at line 75 of file hysteresis.h.
Referenced by get_state(), set_state_and_update(), and update().
|
private |
Definition at line 73 of file hysteresis.h.
Referenced by set_hysteresis_time_from(), and update().
|
private |
Definition at line 72 of file hysteresis.h.
Referenced by set_hysteresis_time_from(), and update().