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