V5 8 Program Slot Concept

The V5 brain can hold programs in eight separate slots. If students want a different name for each slot then they need to make the file name different. The end result is multiple files that need to be maintained for each version.

What I am finding is the majority of our students are maintaining several copies of their code for different auton paths. Often losing track by not remembering which programs are updated, or mixing up the slot a program should be assigned.

Would it be a better approach to use one program and have the eight slots register events or pass a parameter to the programming? It could even be used with blocks by incorporating a number dropdown on the auton and driver hats.

Example:

Brain.Slot.1.Name = "Red Offense";
Brain.Slot.2.Name = "Red Defense";

void preAutonomous(void) {
  switch (Brain.Slot.Selected) {
    case 1:
      Competition.autonomous(AutonRedOffense);
      Competition.drivercontrol(userControl1);
      break;
    case 2:
      Competition.autonomous(AutonRedDefense);
      Competition.drivercontrol(userControl1);
      break;
    case 3:
      //Programming Skills A
      Competition.autonomous(MarySkills);
      break;
    case 4:
      //Driver Skills A
      Competition.drivercontrol(skillsControl1);
      break;
    default:
      Competition.autonomous(autonomous);
      Competition.drivercontrol(userControl);
  }
}

This way if a team were to make changes to their robot design, they would only have to update one program. I think it follows better code practice and would work with version repos.

Thoughts?

There is no reason to remove the functionality of having multiple programs. I feel like students seeing their program 8 different times on the brain screen would just cause more confusion.

They can use the touchscreen lcd api in their program to achieve the same functionality as what you are asking for. If they insist on having their programs on different slots, then maintaining it is a skill they need to improve on, not a problem VEX needs to solve.

That’s not even feasible at this stage of the products life.

did something like that during turning point season - used touch screen to select features to use.

I put together a similar code last year to show my teams that it was an option and to encourage them to try it. It was a bit late, so no one followed through last year, but a couple are considering it this year. Only one team was text coding last year, so I did this in block code.

You simply press your starting area to select Auton routines… Text confirmation on the right of screen. It uses the “broadcast” block to activate the various routines.

@lacsap @evansphysics
Those examples are single program but with user selection via the V5 screen, that’s how we would expect different autonomous routines to be selected (or using other sensors as alternate to the screen).

What @Hudsonville_Robotics was suggesting (I think) was a single program on the brain that could be executed from any brain slot and then receive info about which slot is was executed from. In other words, one program that masqueraded as 8 different programs. That’s something we cannot do on V5 (or IQ2 and EXP) as it would require an approach to programs and the file system inside the V5 firmware that is extreemly different from what has been implemented.