1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include "OpticalFlow.h"
- #include <AP_HAL/utility/OwnPtr.h>
- class AP_OpticalFlow_CXOF : public OpticalFlow_backend
- {
- public:
-
- AP_OpticalFlow_CXOF(OpticalFlow &_frontend, AP_HAL::UARTDriver *uart);
-
- void init() override;
-
- void update(void) override;
-
- static AP_OpticalFlow_CXOF *detect(OpticalFlow &_frontend);
- private:
- AP_HAL::UARTDriver *uart;
- uint64_t last_frame_us;
- uint8_t buf[10];
- uint8_t buf_len;
- Vector2f gyro_sum;
- uint16_t gyro_sum_count;
- };
|