mirror of https://github.com/ArduPilot/ardupilot
uncrustify libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarXL.h
This commit is contained in:
parent
ca3e736501
commit
fce77b367a
|
@ -29,12 +29,14 @@
|
||||||
|
|
||||||
class AP_RangeFinder_MaxsonarXL : public RangeFinder
|
class AP_RangeFinder_MaxsonarXL : public RangeFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AP_RangeFinder_MaxsonarXL(AP_AnalogSource *source, FilterInt16 *filter);
|
AP_RangeFinder_MaxsonarXL(AP_AnalogSource *source, FilterInt16 *filter);
|
||||||
int convert_raw_to_distance(int _raw_value) { return _raw_value * _scaler; } // read value from analog port and return distance in cm
|
int convert_raw_to_distance(int _raw_value) {
|
||||||
float calculate_scaler(int sonar_type, float adc_refence_voltage);
|
return _raw_value * _scaler;
|
||||||
|
} // read value from analog port and return distance in cm
|
||||||
|
float calculate_scaler(int sonar_type, float adc_refence_voltage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float _scaler; // used to account for different sonar types
|
float _scaler; // used to account for different sonar types
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue