X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/865e61e603e69bd8211086a8a0b0be7a424facbe..c9cb3e583513966985082cae8b556411ab5f4eb5:/trunk/src/breve/Demo.tz diff --git a/trunk/src/breve/Demo.tz b/trunk/src/breve/Demo.tz index 1fe9eb1..7794c3d 100644 --- a/trunk/src/breve/Demo.tz +++ b/trunk/src/breve/Demo.tz @@ -34,14 +34,12 @@ CeldasControl : DemoController { 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.