]> git.llucax.com Git - z.facultad/75.68/celdas.git/blobdiff - trunk/src/breve/Demo.tz
(no commit message)
[z.facultad/75.68/celdas.git] / trunk / src / breve / Demo.tz
index 1fe9eb11ecc552f0b61dba0c6d5393c6d57e8683..7794c3de2917e71bb161c62596df8b0593afd51e 100644 (file)
@@ -34,14 +34,12 @@ CeldasControl : DemoController {
                        
                value = sensor get-sensor-value.
 
                        
                value = sensor get-sensor-value.
 
-               if value < 2: {
-                       leftWheel set-velocity to ((leftWheel get-velocity) + 1).
-                       rightWheel set-velocity to ((rightWheel get-velocity) + 1).
-               }
-
-               if value > 2: {
-                       leftWheel set-velocity to ((leftWheel get-velocity) - 1).
-                       rightWheel set-velocity to ((rightWheel get-velocity) - 1).
+               if value < 1: {
+                       leftWheel set-velocity to ((leftWheel get-velocity) + 15).
+                       rightWheel set-velocity to ((rightWheel get-velocity) + 15).
+               } else if value > 10: {
+                       leftWheel set-velocity to ((leftWheel get-velocity) - 15).
+                       rightWheel set-velocity to ((rightWheel get-velocity) - 15).
                }
 
                print value.
                }
 
                print value.