Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new release docs

git-svn-id: svn+ssh://rubyforge.org/var/svn/ruby-nxt/trunk@54 a85beeab-be1c-0410-a5ed-88d17ee140f9
  • Loading branch information...
commit cbd2fc4beb032a2ef32d8939173d2e89af1a06c5 1 parent 5921ea0
gr0k authored
Showing with 13,836 additions and 519 deletions.
  1. +7 −7 www/classes/Array.html
  2. +18 −0 www/classes/Array.src/M000007.html
  3. +18 −0 www/classes/Array.src/M000011.html
  4. +18 −0 www/classes/Array.src/M000015.html
  5. +7 −7 www/classes/Bignum.html
  6. +18 −0 www/classes/Bignum.src/M000022.html
  7. +18 −0 www/classes/Bignum.src/M000026.html
  8. +18 −0 www/classes/Bignum.src/M000030.html
  9. +18 −0 www/classes/Bignum.src/M000032.html
  10. +18 −0 www/classes/Bignum.src/M000034.html
  11. +18 −0 www/classes/Bignum.src/M000044.html
  12. +18 −0 www/classes/Bignum.src/M000062.html
  13. +26 −8 www/classes/Brick.html
  14. +1 −1  www/classes/Brick.src/M000001.html
  15. +19 −0 www/classes/Brick.src/M000002.html
  16. +25 −0 www/classes/Brick.src/M000003.html
  17. +26 −0 www/classes/Brick.src/M000009.html
  18. +19 −0 www/classes/Brick.src/M000010.html
  19. +153 −0 www/classes/Commands.html
  20. +297 −0 www/classes/Commands/LightSensor.html
  21. +25 −0 www/classes/Commands/LightSensor.src/M000112.html
  22. +19 −0 www/classes/Commands/LightSensor.src/M000113.html
  23. +19 −0 www/classes/Commands/LightSensor.src/M000114.html
  24. +23 −0 www/classes/Commands/LightSensor.src/M000115.html
  25. +18 −0 www/classes/Commands/LightSensor.src/M000116.html
  26. +18 −0 www/classes/Commands/LightSensor.src/M000117.html
  27. +23 −0 www/classes/Commands/LightSensor.src/M000118.html
  28. +18 −0 www/classes/Commands/LightSensor.src/M000119.html
  29. +255 −0 www/classes/Commands/Motor.html
  30. +28 −0 www/classes/Commands/Motor.src/M000094.html
  31. +87 −0 www/classes/Commands/Motor.src/M000095.html
  32. +38 −0 www/classes/Commands/Motor.src/M000096.html
  33. +18 −0 www/classes/Commands/Motor.src/M000097.html
  34. +270 −0 www/classes/Commands/Move.html
  35. +26 −0 www/classes/Commands/Move.src/M000101.html
  36. +24 −0 www/classes/Commands/Move.src/M000102.html
  37. +102 −0 www/classes/Commands/Move.src/M000104.html
  38. +66 −0 www/classes/Commands/Move.src/M000105.html
  39. +22 −0 www/classes/Commands/Move.src/M000106.html
  40. +267 −0 www/classes/Commands/RotationSensor.html
  41. +26 −0 www/classes/Commands/RotationSensor.src/M000080.html
  42. +24 −0 www/classes/Commands/RotationSensor.src/M000081.html
  43. +18 −0 www/classes/Commands/RotationSensor.src/M000082.html
  44. +19 −0 www/classes/Commands/RotationSensor.src/M000083.html
  45. +25 −0 www/classes/Commands/RotationSensor.src/M000084.html
  46. +18 −0 www/classes/Commands/RotationSensor.src/M000085.html
  47. +231 −0 www/classes/Commands/Sound.html
  48. +28 −0 www/classes/Commands/Sound.src/M000098.html
  49. +32 −0 www/classes/Commands/Sound.src/M000099.html
  50. +18 −0 www/classes/Commands/Sound.src/M000100.html
  51. +295 −0 www/classes/Commands/SoundSensor.html
  52. +25 −0 www/classes/Commands/SoundSensor.src/M000072.html
  53. +19 −0 www/classes/Commands/SoundSensor.src/M000073.html
  54. +19 −0 www/classes/Commands/SoundSensor.src/M000074.html
  55. +23 −0 www/classes/Commands/SoundSensor.src/M000075.html
  56. +18 −0 www/classes/Commands/SoundSensor.src/M000076.html
  57. +18 −0 www/classes/Commands/SoundSensor.src/M000077.html
  58. +22 −0 www/classes/Commands/SoundSensor.src/M000078.html
  59. +18 −0 www/classes/Commands/SoundSensor.src/M000079.html
  60. +285 −0 www/classes/Commands/TouchSensor.html
  61. +23 −0 www/classes/Commands/TouchSensor.src/M000086.html
  62. +19 −0 www/classes/Commands/TouchSensor.src/M000087.html
  63. +19 −0 www/classes/Commands/TouchSensor.src/M000088.html
  64. +25 −0 www/classes/Commands/TouchSensor.src/M000089.html
  65. +18 −0 www/classes/Commands/TouchSensor.src/M000090.html
  66. +18 −0 www/classes/Commands/TouchSensor.src/M000091.html
  67. +23 −0 www/classes/Commands/TouchSensor.src/M000092.html
  68. +18 −0 www/classes/Commands/TouchSensor.src/M000093.html
  69. +243 −0 www/classes/Commands/UltrasonicSensor.html
  70. +25 −0 www/classes/Commands/UltrasonicSensor.src/M000107.html
  71. +19 −0 www/classes/Commands/UltrasonicSensor.src/M000108.html
  72. +23 −0 www/classes/Commands/UltrasonicSensor.src/M000109.html
  73. +32 −0 www/classes/Commands/UltrasonicSensor.src/M000110.html
  74. +26 −0 www/classes/Commands/UltrasonicSensor.src/M000111.html
  75. +190 −0 www/classes/LightSensor.html
  76. +19 −0 www/classes/LightSensor.src/M000058.html
  77. +19 −0 www/classes/LightSensor.src/M000059.html
  78. +18 −0 www/classes/LightSensor.src/M000060.html
  79. +18 −0 www/classes/LightSensor.src/M000061.html
  80. +105 −172 www/classes/Motor.html
  81. +8 −5 www/classes/Motor.src/M000008.html
  82. +7 −40 www/classes/Motor.src/M000009.html
  83. +6 −5 www/classes/Motor.src/M000010.html
  84. +6 −6 www/classes/Motor.src/M000011.html
  85. +9 −22 www/classes/Motor.src/M000012.html
  86. +22 −0 www/classes/Motor.src/M000013.html
  87. +20 −0 www/classes/Motor.src/M000014.html
  88. +20 −0 www/classes/Motor.src/M000015.html
  89. +24 −0 www/classes/Motor.src/M000016.html
  90. +80 −0 www/classes/Motor.src/M000017.html
  91. +19 −0 www/classes/Motor.src/M000018.html
  92. +20 −0 www/classes/Motor.src/M000019.html
  93. +37 −0 www/classes/Motor.src/M000020.html
  94. +53 −0 www/classes/Motor.src/M000021.html
  95. +19 −0 www/classes/Motor.src/M000022.html
  96. +20 −0 www/classes/Motor.src/M000023.html
  97. +227 −0 www/classes/MotorTest.html
  98. +29 −0 www/classes/MotorTest.src/M000002.html
  99. +18 −0 www/classes/MotorTest.src/M000003.html
  100. +20 −0 www/classes/MotorTest.src/M000004.html
  101. +42 −0 www/classes/MotorTest.src/M000005.html
  102. +22 −0 www/classes/MotorTest.src/M000006.html
  103. +30 −0 www/classes/MotorTest.src/M000007.html
  104. +28 −0 www/classes/MotorTest.src/M000008.html
  105. +69 −36 www/classes/NXT.html
  106. +9 −11 www/classes/NXT.src/M000025.html
  107. +10 −9 www/classes/NXT.src/M000026.html
  108. +8 −10 www/classes/NXT.src/M000027.html
  109. +12 −5 www/classes/NXT.src/M000028.html
  110. +23 −0 www/classes/NXT.src/M000029.html
  111. +25 −0 www/classes/NXT.src/M000030.html
  112. +24 −0 www/classes/NXT.src/M000031.html
  113. +26 −0 www/classes/NXT.src/M000032.html
  114. +23 −0 www/classes/NXT.src/M000033.html
  115. +25 −0 www/classes/NXT.src/M000034.html
  116. +23 −0 www/classes/NXT.src/M000035.html
  117. +25 −0 www/classes/NXT.src/M000036.html
  118. +24 −0 www/classes/NXT.src/M000037.html
  119. +26 −0 www/classes/NXT.src/M000038.html
  120. +19 −0 www/classes/NXT.src/M000039.html
  121. +26 −0 www/classes/NXT.src/M000040.html
  122. +19 −0 www/classes/NXT.src/M000041.html
  123. +23 −0 www/classes/NXT.src/M000047.html
  124. +25 −0 www/classes/NXT.src/M000048.html
  125. +24 −0 www/classes/NXT.src/M000049.html
  126. +26 −0 www/classes/NXT.src/M000050.html
  127. +19 −0 www/classes/NXT.src/M000051.html
  128. +32 −0 www/classes/NXT.src/M000063.html
  129. +43 −0 www/classes/NXT.src/M000064.html
  130. +24 −0 www/classes/NXT.src/M000065.html
  131. +31 −0 www/classes/NXT.src/M000066.html
  132. +31 −0 www/classes/NXT.src/M000067.html
  133. +20 −0 www/classes/NXT.src/M000068.html
  134. +613 −73 www/classes/NXTComm.html
  135. +22 −5 www/classes/NXTComm.src/M000020.html
  136. +18 −0 www/classes/NXTComm.src/M000021.html
  137. +32 −0 www/classes/NXTComm.src/M000022.html
  138. +26 −0 www/classes/NXTComm.src/M000023.html
  139. +35 −0 www/classes/NXTComm.src/M000024.html
  140. +22 −0 www/classes/NXTComm.src/M000025.html
  141. +34 −0 www/classes/NXTComm.src/M000026.html
  142. +20 −0 www/classes/NXTComm.src/M000027.html
  143. +18 −0 www/classes/NXTComm.src/M000028.html
  144. +36 −0 www/classes/NXTComm.src/M000029.html
  145. +26 −0 www/classes/NXTComm.src/M000030.html
  146. +35 −0 www/classes/NXTComm.src/M000031.html
  147. +24 −0 www/classes/NXTComm.src/M000032.html
  148. +21 −0 www/classes/NXTComm.src/M000033.html
  149. +25 −0 www/classes/NXTComm.src/M000034.html
  150. +21 −0 www/classes/NXTComm.src/M000035.html
  151. +21 −0 www/classes/NXTComm.src/M000036.html
  152. +21 −0 www/classes/NXTComm.src/M000037.html
  153. +41 −0 www/classes/NXTComm.src/M000038.html
  154. +45 −0 www/classes/NXTComm.src/M000039.html
  155. +21 −0 www/classes/NXTComm.src/M000040.html
  156. +26 −0 www/classes/NXTComm.src/M000041.html
  157. +23 −0 www/classes/NXTComm.src/M000042.html
  158. +20 −0 www/classes/NXTComm.src/M000043.html
  159. +21 −0 www/classes/NXTComm.src/M000044.html
  160. +20 −0 www/classes/NXTComm.src/M000045.html
  161. +20 −0 www/classes/NXTComm.src/M000046.html
  162. +21 −0 www/classes/NXTComm.src/M000047.html
  163. +28 −0 www/classes/NXTComm.src/M000048.html
  164. +20 −0 www/classes/NXTComm.src/M000049.html
  165. +21 −0 www/classes/NXTComm.src/M000050.html
  166. +182 −0 www/classes/NXTTest.html
  167. +18 −0 www/classes/NXTTest.src/M000030.html
  168. +18 −0 www/classes/NXTTest.src/M000031.html
  169. +38 −0 www/classes/NXTTest.src/M000032.html
  170. +28 −0 www/classes/NXTTest.src/M000033.html
  171. +268 −0 www/classes/Sensor.html
  172. +19 −0 www/classes/Sensor.src/M000016.html
  173. +18 −0 www/classes/Sensor.src/M000017.html
  174. +18 −0 www/classes/Sensor.src/M000018.html
  175. +32 −0 www/classes/Sensor.src/M000019.html
  176. +19 −0 www/classes/Sensor.src/M000020.html
  177. +18 −0 www/classes/Sensor.src/M000021.html
  178. +18 −0 www/classes/Sensor.src/M000022.html
  179. +21 −0 www/classes/Sensor.src/M000023.html
  180. +30 −0 www/classes/Sensor.src/M000024.html
  181. +19 −0 www/classes/Sensor.src/M000025.html
  182. +18 −0 www/classes/Sensor.src/M000026.html
  183. +32 −0 www/classes/Sensor.src/M000027.html
  184. +199 −0 www/classes/SoundSensor.html
  185. +19 −0 www/classes/SoundSensor.src/M000003.html
  186. +19 −0 www/classes/SoundSensor.src/M000004.html
  187. +19 −0 www/classes/SoundSensor.src/M000005.html
  188. +18 −0 www/classes/SoundSensor.src/M000006.html
  189. +18 −0 www/classes/SoundSensor.src/M000007.html
  190. +19 −0 www/classes/SoundSensor.src/M000011.html
  191. +19 −0 www/classes/SoundSensor.src/M000012.html
  192. +35 −12 www/classes/String.html
  193. +6 −7 www/classes/String.src/M000023.html
  194. +21 −0 www/classes/String.src/M000024.html
  195. +20 −0 www/classes/String.src/M000027.html
  196. +21 −0 www/classes/String.src/M000028.html
  197. +20 −0 www/classes/String.src/M000031.html
  198. +21 −0 www/classes/String.src/M000032.html
  199. +20 −0 www/classes/String.src/M000033.html
  200. +21 −0 www/classes/String.src/M000034.html
  201. +20 −0 www/classes/String.src/M000035.html
  202. +21 −0 www/classes/String.src/M000036.html
  203. +20 −0 www/classes/String.src/M000045.html
  204. +21 −0 www/classes/String.src/M000046.html
  205. +45 −0 www/classes/String.src/M000069.html
  206. +20 −0 www/classes/String.src/M000070.html
  207. +21 −0 www/classes/String.src/M000071.html
  208. +175 −0 www/classes/TouchSensor.html
  209. +19 −0 www/classes/TouchSensor.src/M000005.html
  210. +18 −0 www/classes/TouchSensor.src/M000006.html
  211. +19 −0 www/classes/TouchSensor.src/M000008.html
  212. +18 −0 www/classes/TouchSensor.src/M000009.html
  213. +19 −0 www/classes/TouchSensor.src/M000013.html
  214. +18 −0 www/classes/TouchSensor.src/M000014.html
  215. +162 −0 www/classes/UltrasonicComm.html
  216. +18 −0 www/classes/UltrasonicComm.src/M000001.html
  217. +44 −0 www/classes/UltrasonicComm.src/M000002.html
  218. +266 −0 www/classes/UltrasonicSensor.html
  219. +28 −0 www/classes/UltrasonicSensor.src/M000051.html
  220. +39 −0 www/classes/UltrasonicSensor.src/M000052.html
  221. +18 −0 www/classes/UltrasonicSensor.src/M000054.html
  222. +23 −0 www/classes/UltrasonicSensor.src/M000055.html
  223. +18 −0 www/classes/UltrasonicSensor.src/M000057.html
  224. +118 −0 www/classes/UltrasonicSensor/UnmeasurableDistance.html
  225. +1 −1  www/created.rid
  226. +531 −0 www/files/LICENSE.html
  227. +64 −14 www/files/README.html
  228. +16 −2 www/files/brick_rb.html
  229. +141 −0 www/files/examples/mary_rb.html
  230. +18 −0 www/files/examples/mary_rb.src/M000001.html
  231. +109 −0 www/files/examples/nxt_comm_demo_rb.html
  232. +125 −0 www/files/lib/autodetect_nxt_rb.html
  233. +133 −0 www/files/lib/brick_rb.html
  234. +125 −0 www/files/lib/commands/light_sensor_rb.html
  235. +125 −0 www/files/lib/commands/motor_rb.html
  236. +125 −0 www/files/lib/commands/move_rb.html
  237. +125 −0 www/files/lib/commands/rotation_sensor_rb.html
  238. +125 −0 www/files/lib/commands/sound_rb.html
  239. +125 −0 www/files/lib/commands/sound_sensor_rb.html
  240. +125 −0 www/files/lib/commands/touch_sensor_rb.html
  241. +125 −0 www/files/lib/commands/ultrasonic_sensor_rb.html
  242. +136 −0 www/files/lib/commands_rb.html
  243. +132 −0 www/files/lib/motor_rb.html
  244. +133 −0 www/files/lib/nxt_comm_rb.html
  245. +125 −0 www/files/lib/nxt_rb.html
  246. +132 −0 www/files/lib/sensors/light_sensor_rb.html
  247. +132 −0 www/files/lib/sensors/sensor_rb.html
  248. +132 −0 www/files/lib/sensors/sound_sensor_rb.html
  249. +132 −0 www/files/lib/sensors/touch_sensor_rb.html
  250. +125 −0 www/files/lib/sensors/ultrasonic_comm_rb.html
  251. +125 −0 www/files/lib/sensors/ultrasonic_sensor_rb.html
  252. +1 −17 www/files/motor_rb.html
  253. +1 −1  www/files/nxt_comm_rb.html
  254. +1 −9 www/files/nxt_rb.html
  255. +132 −0 www/files/sensor_rb.html
  256. +132 −0 www/files/sound_sensor_rb.html
  257. +108 −0 www/files/test/motor_test_rb.html
  258. +108 −0 www/files/test/nxt_test_rb.html
  259. +132 −0 www/files/touch_sensor_rb.html
  260. +16 −0 www/fr_class_index.html
  261. +21 −4 www/fr_file_index.html
  262. +119 −28 www/fr_method_index.html
  263. +2 −2 www/index.html
View
14 www/classes/Array.html
@@ -55,8 +55,8 @@
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
- <a href="../files/nxt_comm_rb.html">
- nxt_comm.rb
+ <a href="../files/lib/nxt_comm_rb.html">
+ lib/nxt_comm.rb
</a>
<br />
</td>
@@ -86,7 +86,7 @@
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000002">to_hex_str</a>&nbsp;&nbsp;
+ <a href="#M000011">to_hex_str</a>&nbsp;&nbsp;
</div>
</div>
@@ -108,12 +108,12 @@ <h3 class="section-bar">Methods</h3>
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
- <div id="method-M000002" class="method-detail">
- <a name="M000002"></a>
+ <div id="method-M000011" class="method-detail">
+ <a name="M000011"></a>
<div class="method-heading">
- <a href="Array.src/M000002.html" target="Code" class="method-signature"
- onclick="popupCode('Array.src/M000002.html');return false;">
+ <a href="Array.src/M000011.html" target="Code" class="method-signature"
+ onclick="popupCode('Array.src/M000011.html');return false;">
<span class="method-name">to_hex_str</span><span class="method-args">()</span>
</a>
</div>
View
18 www/classes/Array.src/M000007.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>to_hex_str (Array)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 22</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hex_str</span>
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-value str">&quot;0x%02x &quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">e</span>}
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Array.src/M000011.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>to_hex_str (Array)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/nxt_comm.rb, line 31</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hex_str</span>
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-value str">&quot;0x%02x &quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">e</span>}
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Array.src/M000015.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>to_hex_str (Array)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 24</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hex_str</span>
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-value str">&quot;0x%02x &quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">e</span>}
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
14 www/classes/Bignum.html
@@ -55,8 +55,8 @@
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
- <a href="../files/nxt_comm_rb.html">
- nxt_comm.rb
+ <a href="../files/lib/nxt_comm_rb.html">
+ lib/nxt_comm.rb
</a>
<br />
</td>
@@ -86,7 +86,7 @@
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000021">as_signed</a>&nbsp;&nbsp;
+ <a href="#M000062">as_signed</a>&nbsp;&nbsp;
</div>
</div>
@@ -108,12 +108,12 @@ <h3 class="section-bar">Methods</h3>
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
- <div id="method-M000021" class="method-detail">
- <a name="M000021"></a>
+ <div id="method-M000062" class="method-detail">
+ <a name="M000062"></a>
<div class="method-heading">
- <a href="Bignum.src/M000021.html" target="Code" class="method-signature"
- onclick="popupCode('Bignum.src/M000021.html');return false;">
+ <a href="Bignum.src/M000062.html" target="Code" class="method-signature"
+ onclick="popupCode('Bignum.src/M000062.html');return false;">
<span class="method-name">as_signed</span><span class="method-args">()</span>
</a>
</div>
View
18 www/classes/Bignum.src/M000022.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 48</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000026.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 48</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000030.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 48</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000032.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 48</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000034.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 48</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000044.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File nxt_comm.rb, line 46</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Bignum.src/M000062.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>as_signed (Bignum)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/nxt_comm.rb, line 55</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as_signed</span>
+ <span class="ruby-value">-1</span><span class="ruby-operator">*</span>(<span class="ruby-keyword kw">self</span><span class="ruby-operator">^</span><span class="ruby-value">0xffffffff</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0xfffffff</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
34 www/classes/Brick.html
@@ -55,8 +55,8 @@
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
- <a href="../files/brick_rb.html">
- brick.rb
+ <a href="../files/lib/brick_rb.html">
+ lib/brick.rb
</a>
<br />
</td>
@@ -93,7 +93,7 @@
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000001">new</a>&nbsp;&nbsp;
+ <a href="#M000003">new</a>&nbsp;&nbsp;
</div>
</div>
@@ -108,6 +108,24 @@ <h3 class="section-bar">Methods</h3>
+ <div id="attribute-list">
+ <h3 class="section-bar">Attributes</h3>
+
+ <div class="name-list">
+ <table>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">log</td>
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">port</td>
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
@@ -115,13 +133,13 @@ <h3 class="section-bar">Methods</h3>
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
- <div id="method-M000001" class="method-detail">
- <a name="M000001"></a>
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
<div class="method-heading">
- <a href="Brick.src/M000001.html" target="Code" class="method-signature"
- onclick="popupCode('Brick.src/M000001.html');return false;">
- <span class="method-name">new</span><span class="method-args">(port, dev = $DEV)</span>
+ <a href="Brick.src/M000003.html" target="Code" class="method-signature"
+ onclick="popupCode('Brick.src/M000003.html');return false;">
+ <span class="method-name">new</span><span class="method-args">(nxt, port)</span>
</a>
</div>
View
2  www/classes/Brick.src/M000001.html
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File brick.rb, line 24</span>
+ <pre><span class="ruby-comment cmt"># File brick.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">port</span>, <span class="ruby-identifier">dev</span> = <span class="ruby-identifier">$DEV</span>)
<span class="ruby-identifier">logfile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>))<span class="ruby-operator">+</span><span class="ruby-node">&quot;/#{self.class}_#{port}.log&quot;</span>
<span class="ruby-ivar">@log</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">logfile</span>
View
19 www/classes/Brick.src/M000002.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>disconnect (Brick)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File brick.rb, line 47</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect</span>
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">stop</span>
+ <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">close</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
25 www/classes/Brick.src/M000003.html
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>new (Brick)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/brick.rb, line 32</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">nxt</span>, <span class="ruby-identifier">port</span>)
+ <span class="ruby-identifier">logfile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-keyword kw">__FILE__</span>)))<span class="ruby-operator">+</span><span class="ruby-node">&quot;/../log/#{self.class}_#{port}.log&quot;</span>
+ <span class="ruby-ivar">@log</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">logfile</span>
+ <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
+ <span class="ruby-comment cmt">#puts &quot;Logging to #{logfile}&quot;</span>
+
+ <span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;#{self.class}::#{nxt}(#{port})&quot;</span>, <span class="ruby-identifier">:initialize</span>)
+
+ <span class="ruby-ivar">@nxt</span> = <span class="ruby-identifier">nxt</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
26 www/classes/Brick.src/M000009.html
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>new (Brick)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File brick.rb, line 34</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">port</span>, <span class="ruby-identifier">dev</span> = <span class="ruby-identifier">$DEV</span>)
+ <span class="ruby-identifier">logfile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>))<span class="ruby-operator">+</span><span class="ruby-node">&quot;/#{self.class}_#{port}.log&quot;</span>
+ <span class="ruby-ivar">@log</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">logfile</span>
+ <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
+ <span class="ruby-comment cmt">#puts &quot;Logging to #{logfile}&quot;</span>
+
+ <span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;#{self.class}::#{dev}(#{port})&quot;</span>, <span class="ruby-identifier">:initialize</span>)
+
+ <span class="ruby-ivar">@nxt</span> = <span class="ruby-constant">NXTComm</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">dev</span>)
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">start</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
19 www/classes/Brick.src/M000010.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>disconnect (Brick)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File brick.rb, line 47</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect</span>
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">stop</span>
+ <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">close</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
153 www/classes/Commands.html
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: Commands</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">Commands</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../files/lib/commands_rb.html">
+ lib/commands.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Command object based interface that implements the &quot;blocks&quot; in <a
+href="NXT.html">NXT</a>-G. This should be easy to understand if you are
+familiar with the <a href="NXT.html">NXT</a>-G graphical programming
+system. This is automatically included in <a
+href="NXTComm.html">NXTComm</a>.
+</p>
+<h3>Example</h3>
+<pre>
+ require 'nxt_comm'
+
+ @nxt = NXTComm.new('/dev/tty.NXT-DevB-1')
+
+ # more examples can be found in examples/commands.rb
+
+ us = Commands::UltrasonicSensor.new(@nxt)
+ us.mode = :centimeters
+ puts &quot;Distance: #{us.distance}cm&quot;
+ us.mode = :inches
+ puts &quot;Distance: #{us.distance}in&quot;
+
+ us.comparison = &quot;&lt;&quot;
+ us.trigger_point = 5
+
+ while us.logic == false
+ sleep(0.5)
+ puts &quot;Move #{us.comparison} #{us.trigger_point} #{us.mode} from the sensor...&quot;
+ puts &quot;Distance: #{us.distance}in&quot;
+ end
+
+ puts &quot;Got it!&quot;
+</pre>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+ <div id="class-list">
+ <h3 class="section-bar">Classes and Modules</h3>
+
+ Class <a href="Commands/LightSensor.html" class="link">Commands::LightSensor</a><br />
+Class <a href="Commands/Motor.html" class="link">Commands::Motor</a><br />
+Class <a href="Commands/Move.html" class="link">Commands::Move</a><br />
+Class <a href="Commands/RotationSensor.html" class="link">Commands::RotationSensor</a><br />
+Class <a href="Commands/Sound.html" class="link">Commands::Sound</a><br />
+Class <a href="Commands/SoundSensor.html" class="link">Commands::SoundSensor</a><br />
+Class <a href="Commands/TouchSensor.html" class="link">Commands::TouchSensor</a><br />
+Class <a href="Commands/UltrasonicSensor.html" class="link">Commands::UltrasonicSensor</a><br />
+
+ </div>
+
+
+
+
+
+
+
+ <!-- if method_list -->
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
297 www/classes/Commands/LightSensor.html
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Commands::LightSensor</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Commands::LightSensor</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/commands/light_sensor_rb.html">
+ lib/commands/light_sensor.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Implements the &quot;Light <a href="../Sensor.html">Sensor</a>&quot; block
+in <a href="../NXT.html">NXT</a>-G
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000114">generate_light=</a>&nbsp;&nbsp;
+ <a href="#M000116">intensity</a>&nbsp;&nbsp;
+ <a href="#M000115">logic</a>&nbsp;&nbsp;
+ <a href="#M000119">method_missing</a>&nbsp;&nbsp;
+ <a href="#M000112">new</a>&nbsp;&nbsp;
+ <a href="#M000113">port=</a>&nbsp;&nbsp;
+ <a href="#M000117">raw_value</a>&nbsp;&nbsp;
+ <a href="#M000118">set_mode</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+ <div id="attribute-list">
+ <h3 class="section-bar">Attributes</h3>
+
+ <div class="name-list">
+ <table>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">comparison</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">generate_light</td>
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">port</td>
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">trigger_point</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000112" class="method-detail">
+ <a name="M000112"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000112.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000112.html');return false;">
+ <span class="method-name">new</span><span class="method-args">(nxt)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ </div>
+ </div>
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000114" class="method-detail">
+ <a name="M000114"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000114.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000114.html');return false;">
+ <span class="method-name">generate_light=</span><span class="method-args">(logic)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Determines if the sensor&#8217;s own LED is on or not (true or false)
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000116" class="method-detail">
+ <a name="M000116"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000116.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000116.html');return false;">
+ <span class="method-name">intensity</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+intensity of light detected 0-100 in %
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000115" class="method-detail">
+ <a name="M000115"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000115.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000115.html');return false;">
+ <span class="method-name">logic</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+returns true or false based on comparison and trigger point
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000119" class="method-detail">
+ <a name="M000119"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000119.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000119.html');return false;">
+ <span class="method-name">method_missing</span><span class="method-args">(cmd)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+attempt to return the input_value requested
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000113" class="method-detail">
+ <a name="M000113"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000113.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000113.html');return false;">
+ <span class="method-name">port=</span><span class="method-args">(port)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ </div>
+ </div>
+
+ <div id="method-M000117" class="method-detail">
+ <a name="M000117"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000117.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000117.html');return false;">
+ <span class="method-name">raw_value</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+returns the raw value of the sensor
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000118" class="method-detail">
+ <a name="M000118"></a>
+
+ <div class="method-heading">
+ <a href="LightSensor.src/M000118.html" target="Code" class="method-signature"
+ onclick="popupCode('LightSensor.src/M000118.html');return false;">
+ <span class="method-name">set_mode</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+sets up the sensor port
+</p>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
25 www/classes/Commands/LightSensor.src/M000112.html
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>new (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 23</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">nxt</span>)
+ <span class="ruby-ivar">@nxt</span> = <span class="ruby-identifier">nxt</span>
+
+ <span class="ruby-comment cmt"># defaults the same as NXT-G</span>
+ <span class="ruby-ivar">@port</span> = <span class="ruby-value">3</span>
+ <span class="ruby-ivar">@trigger_point</span> = <span class="ruby-value">50</span>
+ <span class="ruby-ivar">@comparison</span> = <span class="ruby-value str">&quot;&gt;&quot;</span>
+ <span class="ruby-ivar">@generate_light</span> = <span class="ruby-keyword kw">true</span>
+ <span class="ruby-identifier">set_mode</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
19 www/classes/Commands/LightSensor.src/M000113.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>port= (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 34</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">port=</span>(<span class="ruby-identifier">port</span>)
+ <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
+ <span class="ruby-identifier">set_mode</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
19 www/classes/Commands/LightSensor.src/M000114.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>generate_light= (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 40</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_light=</span>(<span class="ruby-identifier">logic</span>)
+ <span class="ruby-ivar">@generate_light</span> = <span class="ruby-identifier">logic</span>
+ <span class="ruby-identifier">set_mode</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
23 www/classes/Commands/LightSensor.src/M000115.html
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>logic (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 46</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logic</span>
+ <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@comparison</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;&gt;&quot;</span>
+ <span class="ruby-identifier">intensity</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-ivar">@trigger_point</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;&lt;&quot;</span>
+ <span class="ruby-identifier">intensity</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-ivar">@trigger_point</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Commands/LightSensor.src/M000116.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>intensity (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 56</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">intensity</span>
+ <span class="ruby-identifier">value_scaled</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Commands/LightSensor.src/M000117.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>raw_value (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 61</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raw_value</span>
+ <span class="ruby-identifier">value_raw</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
23 www/classes/Commands/LightSensor.src/M000118.html
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>set_mode (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 66</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_mode</span>
+ <span class="ruby-ivar">@generate_light</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">LIGHT_ACTIVE</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">LIGHT_INACTIVE</span>
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">set_input_mode</span>(
+ <span class="ruby-constant">NXTComm</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-node">&quot;SENSOR_#{@port}&quot;</span>),
+ <span class="ruby-identifier">mode</span>,
+ <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">PCTFULLSCALEMODE</span>
+ )
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
18 www/classes/Commands/LightSensor.src/M000119.html
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>method_missing (Commands::LightSensor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/light_sensor.rb, line 76</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">cmd</span>)
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">get_input_values</span>(<span class="ruby-constant">NXTComm</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-node">&quot;SENSOR_#{@port}&quot;</span>))[<span class="ruby-identifier">cmd</span>]
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
255 www/classes/Commands/Motor.html
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: Commands::Motor</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">Commands::Motor</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/commands/motor_rb.html">
+ lib/commands/motor.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+Implements the &quot;<a href="Motor.html">Motor</a>&quot; block in <a
+href="../NXT.html">NXT</a>-G
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000097">method_missing</a>&nbsp;&nbsp;
+ <a href="#M000094">new</a>&nbsp;&nbsp;
+ <a href="#M000095">start</a>&nbsp;&nbsp;
+ <a href="#M000096">stop</a>&nbsp;&nbsp;
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+ <div id="attribute-list">
+ <h3 class="section-bar">Attributes</h3>
+
+ <div class="name-list">
+ <table>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">action</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">control_power</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">direction</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">duration</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">next_action</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">port</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">power</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">steering</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">wait</td>
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
+ <td class="context-item-desc"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000094" class="method-detail">
+ <a name="M000094"></a>
+
+ <div class="method-heading">
+ <a href="Motor.src/M000094.html" target="Code" class="method-signature"
+ onclick="popupCode('Motor.src/M000094.html');return false;">
+ <span class="method-name">new</span><span class="method-args">(nxt)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ </div>
+ </div>
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000097" class="method-detail">
+ <a name="M000097"></a>
+
+ <div class="method-heading">
+ <a href="Motor.src/M000097.html" target="Code" class="method-signature"
+ onclick="popupCode('Motor.src/M000097.html');return false;">
+ <span class="method-name">method_missing</span><span class="method-args">(cmd)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+attempt to return the output_state requested
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000095" class="method-detail">
+ <a name="M000095"></a>
+
+ <div class="method-heading">
+ <a href="Motor.src/M000095.html" target="Code" class="method-signature"
+ onclick="popupCode('Motor.src/M000095.html');return false;">
+ <span class="method-name">start</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+execute the <a href="Motor.html">Motor</a> command based on the properties
+specified
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000096" class="method-detail">
+ <a name="M000096"></a>
+
+ <div class="method-heading">
+ <a href="Motor.src/M000096.html" target="Code" class="method-signature"
+ onclick="popupCode('Motor.src/M000096.html');return false;">
+ <span class="method-name">stop</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+stop the <a href="Motor.html">Motor</a> command based on the next_action
+property
+</p>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
View
28 www/classes/Commands/Motor.src/M000094.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>new (Commands::Motor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/motor.rb, line 30</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">nxt</span>)
+ <span class="ruby-ivar">@nxt</span> = <span class="ruby-identifier">nxt</span>
+
+ <span class="ruby-comment cmt"># defaults the same as NXT-G</span>
+ <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">:a</span>
+ <span class="ruby-ivar">@direction</span> = <span class="ruby-identifier">:forward</span>
+ <span class="ruby-ivar">@action</span> = <span class="ruby-identifier">:constant</span>
+ <span class="ruby-ivar">@power</span> = <span class="ruby-value">75</span>
+ <span class="ruby-ivar">@control_power</span> = <span class="ruby-keyword kw">false</span>
+ <span class="ruby-ivar">@duration</span> = <span class="ruby-identifier">:unlimited</span>
+ <span class="ruby-ivar">@wait</span> = <span class="ruby-keyword kw">false</span>
+ <span class="ruby-ivar">@next_action</span> = <span class="ruby-identifier">:brake</span>
+ <span class="ruby-keyword kw">end</span></pre>
+</body>
+</html>
View
87 www/classes/Commands/Motor.src/M000095.html
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+ <title>start (Commands::Motor)</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body class="standalone-code">
+ <pre><span class="ruby-comment cmt"># File lib/commands/motor.rb, line 45</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">reset_motor_position</span>(<span class="ruby-constant">NXTComm</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-node">&quot;MOTOR_#{@port.to_s.upcase}&quot;</span>))
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@direction</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:stop</span>
+ <span class="ruby-identifier">motor_power</span> = <span class="ruby-value">0</span>
+ <span class="ruby-identifier">mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">COAST</span>
+ <span class="ruby-identifier">run_state</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTOR_RUN_STATE_IDLE</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-ivar">@direction</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:forward</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">motor_power</span> = <span class="ruby-ivar">@power</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">motor_power</span> = <span class="ruby-operator">-</span><span class="ruby-ivar">@power</span>
+ <span class="ruby-identifier">mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTORON</span> <span class="ruby-operator">|</span> <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">BRAKE</span>
+ <span class="ruby-identifier">run_state</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTOR_RUN_STATE_RUNNING</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-identifier">turn_ratio</span> = <span class="ruby-value">0</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@control_power</span>
+ <span class="ruby-identifier">mode</span> <span class="ruby-operator">|=</span> <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">REGULATED</span>
+ <span class="ruby-identifier">reg_mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">REGULATION_MODE_MOTOR_SPEED</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">reg_mode</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">REGULATION_MODE_IDLE</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:rotations</span>]
+ <span class="ruby-identifier">tacho_limit</span> = <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:rotations</span>] <span class="ruby-operator">*</span> <span class="ruby-value">360</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:degrees</span>]
+ <span class="ruby-identifier">tacho_limit</span> = <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:degrees</span>]
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:seconds</span>]
+ <span class="ruby-identifier">tacho_limit</span> = <span class="ruby-value">0</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">tacho_limit</span> = <span class="ruby-value">0</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:unlimited</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:degrees</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:seconds</span>]
+ <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@action</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:constant</span>
+ <span class="ruby-identifier">run_state</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTOR_RUN_STATE_RUNNING</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:ramp_up</span>
+ <span class="ruby-identifier">run_state</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTOR_RUN_STATE_RAMPUP</span>
+ <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:ramp_down</span>
+ <span class="ruby-identifier">run_state</span> = <span class="ruby-constant">NXTComm</span><span class="ruby-operator">::</span><span class="ruby-constant">MOTOR_RUN_STATE_RAMPDOWN</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+
+ <span class="ruby-ivar">@nxt</span>.<span class="ruby-identifier">set_output_state</span>(
+ <span class="ruby-constant">NXTComm</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-node">&quot;MOTOR_#{@port.to_s.upcase}&quot;</span>),
+ <span class="ruby-identifier">motor_power</span>,
+ <span class="ruby-identifier">mode</span>,
+ <span class="ruby-identifier">reg_mode</span>,
+ <span class="ruby-identifier">turn_ratio</span>,
+ <span class="ruby-identifier">run_state</span>,
+ <span class="ruby-identifier">tacho_limit</span>
+ )
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:unlimited</span> <span class="ruby-keyword kw">or</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:seconds</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-ivar">@wait</span>
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>[<span class="ruby-identifier">:seconds</span>]
+ <span class="ruby-identifier">sleep</span>(<span class="ruby-ivar">@duration</span>[&l