You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
760 B
29 lines
760 B
|
|
#ifndef __AP_HAL_EMPTY_ANALOGIN_H__ |
|
#define __AP_HAL_EMPTY_ANALOGIN_H__ |
|
|
|
#include <AP_HAL_Empty.h> |
|
|
|
class Empty::EmptyAnalogSource : public AP_HAL::AnalogSource { |
|
public: |
|
EmptyAnalogSource(float v); |
|
float read_average(); |
|
float read_latest(); |
|
void set_pin(uint8_t p); |
|
void set_stop_pin(uint8_t p); |
|
void set_settle_time(uint16_t settle_time_ms); |
|
float voltage_average(); |
|
float voltage_latest(); |
|
float voltage_average_ratiometric() { return voltage_average(); } |
|
private: |
|
float _v; |
|
}; |
|
|
|
class Empty::EmptyAnalogIn : public AP_HAL::AnalogIn { |
|
public: |
|
EmptyAnalogIn(); |
|
void init(void* implspecific); |
|
AP_HAL::AnalogSource* channel(int16_t n); |
|
float board_voltage(void); |
|
}; |
|
#endif // __AP_HAL_EMPTY_ANALOGIN_H__
|
|
|