| 1 | |
|---|
| 2 | <!DOCTYPE html |
|---|
| 3 | PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|---|
| 4 | <html> |
|---|
| 5 | <head> |
|---|
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|---|
| 7 | |
|---|
| 8 | <!-- |
|---|
| 9 | This HTML is auto-generated from an M-file. |
|---|
| 10 | To make changes, update the M-file and republish this document. |
|---|
| 11 | --> |
|---|
| 12 | <title>NXT_ResetInputScaledValue</title> |
|---|
| 13 | <meta name="generator" content="MATLAB 7.7"> |
|---|
| 14 | <meta name="date" content="2008-11-04"> |
|---|
| 15 | <meta name="m-file" content="script_NXT_ResetInputScaledValue"> |
|---|
| 16 | <link type="text/css" rel="stylesheet" href="../../style.css"> |
|---|
| 17 | </head> |
|---|
| 18 | <body> |
|---|
| 19 | <p class="header">RWTH - Mindstorms NXT Toolbox</p> |
|---|
| 20 | <div class="content"> |
|---|
| 21 | <h1>NXT_ResetInputScaledValue</h1> |
|---|
| 22 | <!--introduction--> |
|---|
| 23 | <p>Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode)</p> |
|---|
| 24 | <!--/introduction--> |
|---|
| 25 | <h2>Contents</h2> |
|---|
| 26 | <div> |
|---|
| 27 | <ul> |
|---|
| 28 | <li><a href="#2">Syntax</a></li> |
|---|
| 29 | <li><a href="#5">Description</a></li> |
|---|
| 30 | <li><a href="#14">Examples</a></li> |
|---|
| 31 | <li><a href="#17">See also</a></li> |
|---|
| 32 | <li><a href="#19">Signature</a></li> |
|---|
| 33 | </ul> |
|---|
| 34 | </div> |
|---|
| 35 | <h2>Syntax<a name="2"></a></h2> |
|---|
| 36 | <p><tt>NXT_ResetInputScaledValue(port)</tt></p> |
|---|
| 37 | <p><tt>NXT_ResetInputScaledValue(port, handle)</tt></p> |
|---|
| 38 | <h2>Description<a name="5"></a></h2> |
|---|
| 39 | <p><tt>NXT_ResetInputScaledValue(port)</tt> resets the sensors <tt>ScaledVal</tt> back to <tt>0</tt> of the given sensor <tt>port</tt>. The value <tt>port</tt> can be addressed by the symbolic constants <tt>SENSOR_1</tt>, <tt>SENSOR_2</tt>, <tt>SENSOR_3</tt> and <tt>SENSOR_4</tt> analog to the labeling on the NXT Brick. The <tt>ScaledVal</tt> is set by function <tt>NXT_SetInputMode</tt>. |
|---|
| 40 | </p> |
|---|
| 41 | <p><tt>NXT_ResetInputScaledValue(port, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system. |
|---|
| 42 | </p> |
|---|
| 43 | <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used. |
|---|
| 44 | </p> |
|---|
| 45 | <p>For more details see the official LEGO Mindstorms communication protocol.</p> |
|---|
| 46 | <p><b>Note:</b></p> |
|---|
| 47 | <p>This function should be called after using <tt>NXT_SetInputMode</tt>, before you want to actually use your new special input value (to make sure counting starts at zero). See <tt>NXT_GetInputValues</tt> for more details about what kind of values are returned. |
|---|
| 48 | </p> |
|---|
| 49 | <h2>Examples<a name="14"></a></h2><pre class="codeinput"> NXT_ResetInputScaledValue(SENSOR_2); |
|---|
| 50 | </pre><pre class="codeinput"> handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>); |
|---|
| 51 | NXT_ResetInputScaledValue(SENSOR_4, handle); |
|---|
| 52 | </pre><h2>See also<a name="17"></a></h2> |
|---|
| 53 | <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="NXT_GetInputValues.html">NXT_GetInputValues</a></p> |
|---|
| 54 | <h2>Signature<a name="19"></a></h2> |
|---|
| 55 | <div> |
|---|
| 56 | <ul> |
|---|
| 57 | <li><b>Author:</b> Linus Atorf (see AUTHORS) |
|---|
| 58 | </li> |
|---|
| 59 | <li><b>Date:</b> 2007/10/15 |
|---|
| 60 | </li> |
|---|
| 61 | <li><b>Copyright:</b> 2007-2008, RWTH Aachen University |
|---|
| 62 | </li> |
|---|
| 63 | </ul> |
|---|
| 64 | </div> |
|---|
| 65 | <p class="footer"><br> |
|---|
| 66 | Published with wg_publish; V1.0<br></p> |
|---|
| 67 | </div> |
|---|
| 68 | <!-- |
|---|
| 69 | ##### SOURCE BEGIN ##### |
|---|
| 70 | %% NXT_ResetInputScaledValue |
|---|
| 71 | % Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode) |
|---|
| 72 | %% |
|---|
| 73 | %% Syntax |
|---|
| 74 | % |NXT_ResetInputScaledValue(port)| |
|---|
| 75 | %% |
|---|
| 76 | % |NXT_ResetInputScaledValue(port, handle)| |
|---|
| 77 | %% |
|---|
| 78 | %% Description |
|---|
| 79 | % |NXT_ResetInputScaledValue(port)| resets the sensors |ScaledVal| back to |0| of the given sensor |
|---|
| 80 | % |port|. The value |port| can be addressed by the symbolic constants |SENSOR_1|, |SENSOR_2|, |
|---|
| 81 | % |SENSOR_3| and |SENSOR_4| analog to the labeling on the NXT Brick. The |ScaledVal| is set by |
|---|
| 82 | % function |NXT_SetInputMode|. |
|---|
| 83 | %% |
|---|
| 84 | % |NXT_ResetInputScaledValue(port, handle)| uses the given NXT connection |handle|. This should be a |
|---|
| 85 | % struct containing a serial handle on a PC system and a file handle on a Linux system. |
|---|
| 86 | %% |
|---|
| 87 | % If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used. |
|---|
| 88 | %% |
|---|
| 89 | % For more details see the official LEGO Mindstorms communication protocol. |
|---|
| 90 | %% |
|---|
| 91 | %% |
|---|
| 92 | % *Note:* |
|---|
| 93 | %% |
|---|
| 94 | %% |
|---|
| 95 | % This function should be called after using |NXT_SetInputMode|, before you want to actually use your new |
|---|
| 96 | % special input value (to make sure counting starts at zero). See |NXT_GetInputValues| for more details |
|---|
| 97 | % about what kind of values are returned. |
|---|
| 98 | %% |
|---|
| 99 | %% Examples |
|---|
| 100 | NXT_ResetInputScaledValue(SENSOR_2); |
|---|
| 101 | %% |
|---|
| 102 | handle = COM_OpenNXT('bluetooth.ini','check'); |
|---|
| 103 | NXT_ResetInputScaledValue(SENSOR_4, handle); |
|---|
| 104 | %% |
|---|
| 105 | %% See also |
|---|
| 106 | % NXT_SetInputMode, NXT_GetInputValues |
|---|
| 107 | %% |
|---|
| 108 | %% Signature |
|---|
| 109 | %% |
|---|
| 110 | % * *Author:* Linus Atorf (see AUTHORS) |
|---|
| 111 | % * *Date:* 2007/10/15 |
|---|
| 112 | % * *Copyright:* 2007-2008, RWTH Aachen University |
|---|
| 113 | % |
|---|
| 114 | |
|---|
| 115 | ##### SOURCE END ##### |
|---|
| 116 | --> |
|---|
| 117 | </body> |
|---|
| 118 | </html> |
|---|