Project

General

Profile

Revision 1475

Added by Dan Shope almost 14 years ago

linearize_distance() uses new LUT mapped for (4-30cm) rangefinders. Accuracy +/- 10mm. Need more testing to increase accuracy -- should be able to get +/- 5mm.

View differences:

rangefinder.h
53 53
/** @brief IR Rangefinder 5 **/
54 54
#define IR5 2
55 55
/** @brief smallest meaningful rangefinder reading (logarithmic scale) **/
56
#define MIN_IR_ADC8 27
56
#define MIN_IR_ADC8 20
57 57
/** @brief largest meaningful rangefinder reading (logarithmic scale) **/
58
#define MAX_IR_ADC8 98
58
#define MAX_IR_ADC8 133
59 59

  
60 60
/** @brief Initialize the rangefinders **/
61
void range_init(void);
61
int range_init(void);
62 62
/** @brief Read the distance from a rangefinder **/
63 63
int range_read_distance(int range_id);
64 64
/** @brief Convert logarithmic-scale distance readings to a linear scale **/

Also available in: Unified diff