Revision 1826 trunk/code/projects/libdragonfly/rangefinder.h

View differences:

rangefinder.h
56 56
#define MIN_IR_ADC8 27
57 57
/** @brief largest meaningful rangefinder reading (logarithmic scale) **/
58 58
#define MAX_IR_ADC8 98
59
/** @brief smallest meaningful rangefinder reading (linear scale) **/
60
#define MIN_IR_LINEAR 78
61
/** @brief largest meaningful rangefinder reading (linear scale) **/
62
#define MAX_IR_LINEAR 327
59 63

  
60 64
/** @brief Initialize the rangefinders **/
61 65
void range_init(void);
66
/** @brief Initialize the rangefinders with option to use filtering **/
67
void range_init_filter(int filter);
62 68
/** @brief Read the distance from a rangefinder **/
63 69
int range_read_distance(int range_id);
64 70
/** @brief Convert logarithmic-scale distance readings to a linear scale **/
65 71
int linearize_distance(int value);
72
/** @brief Task that reads rangefinders and sends the values to the filter **/
73
void butter_task(void);
74
/** @brief Initialize the butterworth filter **/
75
void butter_init(void);
76
/** @brief Puts a raw rangefinder value through the Butterworth filter **/
77
void butter_filter(int range_id, int16_t val);
78
/** @brief Returns the most recent filtered reading of the rangefinder **/
79
int range_read_filtered_distance(int range_id);
66 80

  
67 81
/** @} **/ //end addtogroup
68 82

  

Also available in: Unified diff