39 #include <gtest/gtest.h> 47 TEST(Hysteresis, InitFalse)
77 hysteresis.
update(time_us);
81 TEST(Hysteresis, ChangeAfterTime)
93 hysteresis.
update(time_us);
96 hysteresis.
update(time_us);
103 hysteresis.
update(time_us);
106 hysteresis.
update(time_us);
110 TEST(Hysteresis, HysteresisChanged)
122 hysteresis.
update(time_us);
125 hysteresis.
update(time_us);
135 hysteresis.
update(time_us);
138 hysteresis.
update(time_us);
142 TEST(Hysteresis, ChangeAfterMultipleSets)
171 TEST(Hysteresis, TakeChangeBack)
182 hysteresis.
update(time_us);
188 hysteresis.
update(time_us);
195 hysteresis.
update(time_us);
198 hysteresis.
update(time_us);
void set_state_and_update(const bool new_state, const hrt_abstime &now_us)
void update(const hrt_abstime &now_us)
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
TEST(Hysteresis, InitFalse)
Hysteresis of a boolean value.
void set_hysteresis_time_from(const bool from_state, const hrt_abstime new_hysteresis_time_us)
static constexpr hrt_abstime SOME_START_TIME