ardupilot/libraries/AP_OpticalFlow/AP_OpticalFlow_SITL.h

26 lines
518 B
C
Raw Permalink Normal View History

#pragma once
#include "AP_OpticalFlow.h"
#if AP_OPTICALFLOW_SITL_ENABLED
class AP_OpticalFlow_SITL : public OpticalFlow_backend
{
public:
/// constructor
using OpticalFlow_backend::OpticalFlow_backend;
// update - read latest values from sensor and fill in x,y and totals.
void update(void) override;
private:
uint32_t last_flow_ms;
uint8_t next_optflow_index;
uint8_t optflow_delay;
AP_OpticalFlow::OpticalFlow_state optflow_data[20];
};
#endif // AP_OPTICALFLOW_SITL_ENABLED