<ahref="_range_finder_8h.html">Go to the documentation of this file.</a><divclass="fragment"><preclass="fragment"><aname="l00001"></a>00001 <spanclass="preprocessor">#ifndef RangeFinder_h</span>
<aname="l00022"></a><aclass="code"href="class_range_finder.html#a93f1fae66bdb0f5b411a3f81e9edf138">00022</a><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#a93f1fae66bdb0f5b411a3f81e9edf138">_analogPort</a>; <spanclass="comment">// the port to which the sensor is connected</span>
<aname="l00026"></a><aclass="code"href="class_range_finder.html#a3302ba2e251a3837b031925e1d7da70a">00026</a><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#a3302ba2e251a3837b031925e1d7da70a">raw_value</a>; <spanclass="comment">// raw value from the sensor</span>
<aname="l00027"></a><aclass="code"href="class_range_finder.html#aff9e96ba48f000d6b7db0770ee5d7026">00027</a><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#aff9e96ba48f000d6b7db0770ee5d7026">distance</a>; <spanclass="comment">// distance in cm</span>
<aname="l00028"></a><aclass="code"href="class_range_finder.html#a6831ca88e4ca73e80f46fb252a786b5d">00028</a><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#a6831ca88e4ca73e80f46fb252a786b5d">max_distance</a>; <spanclass="comment">// maximum measurable distance (in cm)</span>
<aname="l00029"></a><aclass="code"href="class_range_finder.html#abb14b4bcb72e92ff74ad4e6e17f5d460">00029</a><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#abb14b4bcb72e92ff74ad4e6e17f5d460">min_distance</a>; <spanclass="comment">// minimum measurable distance (in cm)</span>
<aname="l00032"></a>00032 <spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#a833cdd23c2de887860e50e0180601add">filter</a>(<spanclass="keywordtype">int</span> latestValue); <spanclass="comment">// returns the average of the last AP_RANGEFINDER_NUM_AVERAGES values</span>
<aname="l00035"></a>00035 <spanclass="keyword">virtual</span><spanclass="keywordtype">void</span><aclass="code"href="class_range_finder.html#a7d6aef1559f205bac93327078c58840a">set_orientation</a>(<spanclass="keywordtype">int</span> x, <spanclass="keywordtype">int</span> y, <spanclass="keywordtype">int</span> z);
<aname="l00036"></a>00036 <spanclass="keyword">virtual</span><spanclass="keywordtype">int</span><aclass="code"href="class_range_finder.html#a4dfe0b901e3551141dd08618219e037f">read</a>(); <spanclass="comment">// read value from analog port and return distance in cm</span>
Generated for ArduPilot Libraries by <ahref="http://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.png"alt="doxygen"/></a></small></address>