Choosing Auton While disabled

So I use this code to choose my autonomous in usercontrol before plugging into the field for a match. Would it be possible to run this task from main and not usercontrol and still use the controller to set variables while I am disabled from the field if I plug in then choose autonomous?

  while (true) {
    if (Controller1.Axis4.position() > 60) {
      if (!(autonNumber ==
            11)) { // make this max num of autons that can be chosen
        autonNumber = autonNumber + 1;
      } else {
        autonNumber = 1;
      }
    }
    if (Controller1.Axis4.position() < -60) {
      if (!(autonNumber == 1)) {
        autonNumber = autonNumber - 1;
      } else {
        autonNumber = 11; // make this max num of autons that can be chosen
      }
    }
    wait(500, msec);
  }
  return (0);
}

@jpearman I have a similar question.

happy cake day!

1 Like

That’s actually the birthday tag, not the cake day one. The cake day tag is a slice of cake, while the birthday one is a full cake.

happy birthday! my bad

2 Likes

You can put the code in the Pre Autonomous function.

1 Like

This is example code built form James Pearman’s button selector code… It was written with VCS and should port to VEXcode

Afaik, you can’t use the controller while disabled.

ah missed from the controller bit…

you can confirmation text to display on the controller… that does help teams.

Thanks, that answers the question