Like was done for AP_HAL_Linux in 2ac96b9
("AP_HAL_Linux: remove prefix
from AP_HAL_Linux classes"), remove the "Empty" prefix from class names
since we are already inside the Empty namespace.
30 lines
722 B
C++
30 lines
722 B
C++
|
|
#ifndef __AP_HAL_EMPTY_ANALOGIN_H__
|
|
#define __AP_HAL_EMPTY_ANALOGIN_H__
|
|
|
|
#include "AP_HAL_Empty.h"
|
|
|
|
class Empty::AnalogSource : public AP_HAL::AnalogSource {
|
|
public:
|
|
AnalogSource(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::AnalogIn : public AP_HAL::AnalogIn {
|
|
public:
|
|
AnalogIn();
|
|
void init();
|
|
AP_HAL::AnalogSource* channel(int16_t n);
|
|
float board_voltage(void);
|
|
};
|
|
#endif // __AP_HAL_EMPTY_ANALOGIN_H__
|