12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #pragma once
- #include <AP_Math/AP_Math.h>
- class IRLock
- {
- public:
-
-
- virtual void init(int8_t bus) = 0;
-
- bool healthy() const { return _flags.healthy; }
-
- uint32_t last_update_ms() const { return _last_update_ms; }
-
- size_t num_targets() const { return _flags.healthy?1:0; }
-
- virtual bool update() = 0;
-
-
- bool get_unit_vector_body(Vector3f& ret) const;
-
- protected:
- struct AP_IRLock_Flags {
- uint8_t healthy : 1;
- } _flags;
-
- uint32_t _last_update_ms;
-
- typedef struct {
- uint32_t timestamp;
- float pos_x;
- float pos_y;
- float pos_z;
- } irlock_target_info;
- irlock_target_info _target_info;
- };
|