|
APM:Libraries
|
#include <AP_OpticalFlow_Pixart.h>
Classes | |
| struct | MotionBurst |
| struct | RegData |
Public Member Functions | |
| AP_OpticalFlow_Pixart (const char *devname, OpticalFlow &_frontend) | |
| constructor More... | |
| void | init () override |
| void | update (void) override |
Public Member Functions inherited from OpticalFlow_backend | |
| OpticalFlow_backend (OpticalFlow &_frontend) | |
| virtual | ~OpticalFlow_backend (void) |
Static Public Member Functions | |
| static AP_OpticalFlow_Pixart * | detect (const char *devname, OpticalFlow &_frontend) |
Private Types | |
| enum | { PIXART_3900 =0, PIXART_3901 =1 } |
Private Member Functions | |
| bool | setup_sensor (void) |
| void | reg_write (uint8_t reg, uint8_t value) |
| uint8_t | reg_read (uint8_t reg) |
| int16_t | reg_read16s (uint8_t reg) |
| uint16_t | reg_read16u (uint8_t reg) |
| void | srom_download (void) |
| void | load_configuration (const RegData *init_data, uint16_t n) |
| void | timer (void) |
| void | motion_burst (void) |
Private Attributes | |
| AP_HAL::OwnPtr< AP_HAL::SPIDevice > | _dev |
| enum AP_OpticalFlow_Pixart:: { ... } | model |
| struct PACKED AP_OpticalFlow_Pixart::MotionBurst | burst |
| struct { | |
| Vector2l sum | |
| uint32_t last_frame_us | |
| uint32_t sum_us | |
| Vector2f gyro | |
| } | integral |
| const float | flow_pixel_scaling = 1.26e-3 |
| uint32_t | last_burst_us |
| uint32_t | last_update_ms |
Static Private Attributes | |
| static const uint8_t | srom_data [] |
| static const uint8_t | srom_id = 0xED |
| static const RegData | init_data_3900 [] |
| static const RegData | init_data_3901_1 [] |
| static const RegData | init_data_3901_2 [] |
Additional Inherited Members | |
Protected Member Functions inherited from OpticalFlow_backend | |
| void | _update_frontend (const struct OpticalFlow::OpticalFlow_state &state) |
| Vector2f | _flowScaler (void) const |
| float | _yawAngleRad (void) const |
| void | _applyYaw (Vector2f &v) |
| AP_AHRS_NavEKF & | get_ahrs (void) |
| uint8_t | get_address (void) const |
Protected Attributes inherited from OpticalFlow_backend | |
| OpticalFlow & | frontend |
| AP_HAL::Semaphore * | _sem |
Definition at line 6 of file AP_OpticalFlow_Pixart.h.
|
private |
| Enumerator | |
|---|---|
| PIXART_3900 | |
| PIXART_3901 | |
Definition at line 24 of file AP_OpticalFlow_Pixart.h.
| AP_OpticalFlow_Pixart::AP_OpticalFlow_Pixart | ( | const char * | devname, |
| OpticalFlow & | _frontend | ||
| ) |
constructor
Definition at line 83 of file AP_OpticalFlow_Pixart.cpp.
Referenced by detect().
|
static |
Definition at line 91 of file AP_OpticalFlow_Pixart.cpp.
Referenced by init(), and OpticalFlow::init().
|
inlineoverridevirtual |
Implements OpticalFlow_backend.
Definition at line 13 of file AP_OpticalFlow_Pixart.h.
|
private |
Definition at line 250 of file AP_OpticalFlow_Pixart.cpp.
Referenced by setup_sensor().
|
private |
Definition at line 266 of file AP_OpticalFlow_Pixart.cpp.
Referenced by timer().
|
private |
Definition at line 196 of file AP_OpticalFlow_Pixart.cpp.
Referenced by load_configuration(), reg_read16u(), and setup_sensor().
|
private |
|
private |
Definition at line 209 of file AP_OpticalFlow_Pixart.cpp.
Referenced by reg_read16s(), and setup_sensor().
|
private |
Definition at line 184 of file AP_OpticalFlow_Pixart.cpp.
Referenced by load_configuration(), setup_sensor(), and srom_download().
|
private |
Definition at line 105 of file AP_OpticalFlow_Pixart.cpp.
Referenced by detect().
|
private |
Definition at line 223 of file AP_OpticalFlow_Pixart.cpp.
Referenced by setup_sensor().
|
private |
Definition at line 290 of file AP_OpticalFlow_Pixart.cpp.
Referenced by setup_sensor().
|
overridevirtual |
Implements OpticalFlow_backend.
Definition at line 335 of file AP_OpticalFlow_Pixart.cpp.
Referenced by init().
|
private |
Definition at line 22 of file AP_OpticalFlow_Pixart.h.
Referenced by AP_OpticalFlow_Pixart(), motion_burst(), reg_read(), reg_write(), setup_sensor(), and srom_download().
|
private |
Referenced by motion_burst(), timer(), and update().
|
private |
Definition at line 59 of file AP_OpticalFlow_Pixart.h.
Referenced by update().
| Vector2f AP_OpticalFlow_Pixart::gyro |
Definition at line 51 of file AP_OpticalFlow_Pixart.h.
Referenced by timer().
|
staticprivate |
Definition at line 56 of file AP_OpticalFlow_Pixart.h.
Referenced by setup_sensor().
|
staticprivate |
Definition at line 57 of file AP_OpticalFlow_Pixart.h.
Referenced by setup_sensor().
|
staticprivate |
Definition at line 58 of file AP_OpticalFlow_Pixart.h.
Referenced by setup_sensor().
| struct { ... } AP_OpticalFlow_Pixart::integral |
Referenced by setup_sensor(), timer(), and update().
|
private |
Definition at line 75 of file AP_OpticalFlow_Pixart.h.
Referenced by timer().
| uint32_t AP_OpticalFlow_Pixart::last_frame_us |
Definition at line 49 of file AP_OpticalFlow_Pixart.h.
|
private |
Definition at line 76 of file AP_OpticalFlow_Pixart.h.
Referenced by update().
| enum { ... } AP_OpticalFlow_Pixart::model |
Referenced by motion_burst(), and setup_sensor().
|
staticprivate |
Definition at line 54 of file AP_OpticalFlow_Pixart.h.
Referenced by srom_download().
|
staticprivate |
Definition at line 55 of file AP_OpticalFlow_Pixart.h.
Referenced by setup_sensor().
| Vector2l AP_OpticalFlow_Pixart::sum |
Definition at line 48 of file AP_OpticalFlow_Pixart.h.
| uint32_t AP_OpticalFlow_Pixart::sum_us |
Definition at line 50 of file AP_OpticalFlow_Pixart.h.
1.8.13