Skip to content

Commit

Permalink
real
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinencounter committed Nov 17, 2024
1 parent a4bfc5c commit a926bb1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions TeamCode/src/main/java/org/firstinspires/ftc/teamcode/HWTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class HWTest : LinearOpMode() {
telemetry.addLine(message)
telemetry.addLine()
telemetry.addLine("[A]: $yes. [B]: $no.")
telemetry.update()
var res = true
while (opModeIsActive()) {
val a = gamepad1.a
Expand Down Expand Up @@ -76,11 +77,11 @@ class HWTest : LinearOpMode() {

fun testEncoderA(enc: Encoder, label: String) {
val basis = enc.getCurrentPosition()
telemetry.addLine("Move the $label...")
telemetry.addLine("or press B to skip")
telemetry.update()
var res = false
while (opModeIsActive()) {
telemetry.addLine("Move the $label...")
telemetry.addLine("or press B to skip")
telemetry.update()
val delta = enc.getCurrentPosition() - basis
if (abs(delta) > 10) {
res = true
Expand All @@ -99,11 +100,11 @@ class HWTest : LinearOpMode() {

fun testEncoderB(enc: DcMotor, label: String) {
val basis = enc.currentPosition
telemetry.addLine("Move the $label...")
telemetry.addLine("or press B to skip")
telemetry.update()
var res = false
while (opModeIsActive()) {
telemetry.addLine("Move the $label...")
telemetry.addLine("or press B to skip")
telemetry.update()
val delta = enc.currentPosition - basis
if (abs(delta) > 10) {
res = true
Expand Down

0 comments on commit a926bb1

Please sign in to comment.