From b1287f695c61a33e4e910aa6631ac12dbf3e0577 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 11 Oct 2023 17:46:18 -0700 Subject: [PATCH] tweak microcode data --- robot/robotdriver.ts | 2 ++ robot/test.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/robot/robotdriver.ts b/robot/robotdriver.ts index fd1d7e6e..00a16109 100644 --- a/robot/robotdriver.ts +++ b/robot/robotdriver.ts @@ -62,6 +62,7 @@ namespace microcode { this.running = true this.showConfiguration = SHOW_CONFIG_COUNT + this.robot.headlightsSetColor(0, 0xff, 0) // wake up sensors this.ultrasonicDistance() this.lineState() @@ -299,6 +300,7 @@ namespace microcode { this.setHeadlingSpeedColor(speed) this.targetSpeedMode = RobotSpeedMode.Turn this.targetSpeed = speed + this.currentSpeed = 0 } } diff --git a/robot/test.ts b/robot/test.ts index 4f9e7178..ef82202f 100644 --- a/robot/test.ts +++ b/robot/test.ts @@ -4,8 +4,12 @@ microcode.elecfreaksCuteBot.start() //microcode.keyStudioMiniSmartRobot.start() //microcode.setMotorDrift(6) -microcode.robotDriver.motorRun(100) +// microcode... +microcode.elecfreaksCuteBot.robot.maxLineRunSpeed = 28 +microcode.elecfreaksCuteBot.robot.maxLineTurnSpeed = 26 +/* +microcode.robotDriver.motorRun(100) let i = 0 basic.forever(() => { const lines = microcode.robotDriver.currentLineState @@ -21,3 +25,4 @@ basic.forever(() => { else microcode.robotDriver.motorRun(100) }) +*/ \ No newline at end of file