mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 13:30:35 +08:00
Expand test framework and test cases (#685)
* Fix comment * Ekf wrapper for testing Add utility function for accessing information in the ekf object * Add step function for Gps sensor * Add RangeFinder and Flow to simulated sensors * Add first fusion logic tests * Add units to function name * Use EXPECT_TRUE * Adding missing qualifiers * Improve EXPECT_ calls * Improve naming
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "range_finder.h"
|
||||
|
||||
namespace sensor_simulator
|
||||
{
|
||||
namespace sensor
|
||||
{
|
||||
|
||||
RangeFinder::RangeFinder(std::shared_ptr<Ekf> ekf):Sensor(ekf)
|
||||
{
|
||||
}
|
||||
|
||||
RangeFinder::~RangeFinder()
|
||||
{
|
||||
}
|
||||
|
||||
void RangeFinder::send(uint32_t time)
|
||||
{
|
||||
_ekf->setRangeData(time, _range_data, _range_quality);
|
||||
}
|
||||
|
||||
void RangeFinder::setData(float range_data_meters, int8_t range_quality)
|
||||
{
|
||||
_range_data = range_data_meters;
|
||||
_range_quality = range_quality;
|
||||
}
|
||||
|
||||
} // namespace sensor
|
||||
} // namespace sensor_simulator
|
||||
Reference in New Issue
Block a user