|
|
|
@ -39,6 +39,11 @@ public:
@@ -39,6 +39,11 @@ public:
|
|
|
|
|
AP_WheelEncoder(const AP_WheelEncoder &other) = delete; |
|
|
|
|
AP_WheelEncoder &operator=(const AP_WheelEncoder&) = delete; |
|
|
|
|
|
|
|
|
|
// get singleton instance
|
|
|
|
|
static AP_WheelEncoder *get_singleton() { |
|
|
|
|
return _singleton; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// WheelEncoder driver types
|
|
|
|
|
enum WheelEncoder_Type : uint8_t { |
|
|
|
|
WheelEncoder_TYPE_NONE = 0, |
|
|
|
@ -121,4 +126,12 @@ protected:
@@ -121,4 +126,12 @@ protected:
|
|
|
|
|
AP_WheelEncoder_Backend *drivers[WHEELENCODER_MAX_INSTANCES]; |
|
|
|
|
uint8_t num_instances; |
|
|
|
|
Vector3f pos_offset_zero; // allows returning position offsets of zero for invalid requests
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
static AP_WheelEncoder *_singleton; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace AP { |
|
|
|
|
AP_WheelEncoder *wheelencoder(); |
|
|
|
|
} |
|
|
|
|