ardupilot/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarXL.h
Pat Hickey f36ded2854 RangeFinder: rework to use AnalogSource library
this removes the hacks that check for the ADC object, and instead
choose the method of getting the analog sonar value via the
AnalogSource API
2011-11-25 20:00:16 -08:00

19 lines
532 B
C++

#ifndef AP_RangeFinder_MaxsonarXL_H
#define AP_RangeFinder_MaxsonarXL_H
#include "RangeFinder.h"
#define AP_RANGEFINDER_MAXSONARXL_MIN_DISTANCE 20
#define AP_RANGEFINDER_MAXSONARXL_MAX_DISTANCE 700
class AP_RangeFinder_MaxsonarXL : public RangeFinder
{
// public:
//AP_GPS_MTK(Stream *s);
public:
AP_RangeFinder_MaxsonarXL(AP_AnalogSource *source, ModeFilter *filter);
int convert_raw_to_distance(int _raw_value) { return _raw_value; } // read value from analog port and return distance in cm
};
#endif