PX4 Firmware
PX4 Autopilot Software http://px4.io
HysteresisTest.cpp File Reference
#include <gtest/gtest.h>
#include "hysteresis.h"
Include dependency graph for HysteresisTest.cpp:

Go to the source code of this file.

Functions

 TEST (Hysteresis, InitFalse)
 
 TEST (Hysteresis, InitTrue)
 
 TEST (Hysteresis, Zero)
 
 TEST (Hysteresis, ChangeAfterTime)
 
 TEST (Hysteresis, HysteresisChanged)
 
 TEST (Hysteresis, ChangeAfterMultipleSets)
 
 TEST (Hysteresis, TakeChangeBack)
 

Variables

static constexpr hrt_abstime SOME_START_TIME = 1558359616134000llu
 

Function Documentation

◆ TEST() [1/7]

TEST ( Hysteresis  ,
InitFalse   
)

Definition at line 47 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state().

Here is the call graph for this function:

◆ TEST() [2/7]

TEST ( Hysteresis  ,
InitTrue   
)

Definition at line 53 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state().

Here is the call graph for this function:

◆ TEST() [3/7]

TEST ( Hysteresis  ,
Zero   
)

Definition at line 59 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state(), hrt_abstime, systemlib::Hysteresis::set_state_and_update(), SOME_START_TIME, and systemlib::Hysteresis::update().

Here is the call graph for this function:

◆ TEST() [4/7]

TEST ( Hysteresis  ,
ChangeAfterTime   
)

Definition at line 81 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state(), hrt_abstime, systemlib::Hysteresis::set_hysteresis_time_from(), systemlib::Hysteresis::set_state_and_update(), SOME_START_TIME, and systemlib::Hysteresis::update().

Here is the call graph for this function:

◆ TEST() [5/7]

TEST ( Hysteresis  ,
HysteresisChanged   
)

Definition at line 110 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state(), hrt_abstime, systemlib::Hysteresis::set_hysteresis_time_from(), systemlib::Hysteresis::set_state_and_update(), SOME_START_TIME, and systemlib::Hysteresis::update().

Here is the call graph for this function:

◆ TEST() [6/7]

TEST ( Hysteresis  ,
ChangeAfterMultipleSets   
)

Definition at line 142 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state(), hrt_abstime, systemlib::Hysteresis::set_hysteresis_time_from(), systemlib::Hysteresis::set_state_and_update(), and SOME_START_TIME.

Here is the call graph for this function:

◆ TEST() [7/7]

TEST ( Hysteresis  ,
TakeChangeBack   
)

Definition at line 171 of file HysteresisTest.cpp.

References systemlib::Hysteresis::get_state(), hrt_abstime, systemlib::Hysteresis::set_hysteresis_time_from(), systemlib::Hysteresis::set_state_and_update(), SOME_START_TIME, and systemlib::Hysteresis::update().

Here is the call graph for this function:

Variable Documentation

◆ SOME_START_TIME

constexpr hrt_abstime SOME_START_TIME = 1558359616134000llu
static

Definition at line 44 of file HysteresisTest.cpp.

Referenced by TEST().