Unable to select a pipeline in PhotonVision

This question seems to be asked occasionally, but nothing has worked for us. We are running the versionb 2023.4.2 on a raspberryPi 3b. We have used photonVision in past seasons to target balls.

We set up the web interface to target yellow cones. Our java program connects to the camera and is able to use the data to target a cone. We added a second pipeline for a blue cube. If we select the cube in the web interface, the program will successfully target the cube.

We then added pipeline selections to our code. One command selects 0 the other selects 1 as shown here.

camera.setPipelineIndex(1);  // select cube targeting

It has no effect, The target data for the pipeline selected in the web interface is always returned.

Link to your code and screenshot of your settings page in PV?

Oopsie. It was a simple code error. It now targets cubes or cones.

Now it switches, but it takes the while for the auto exposure to adjust when we switch. Should Iwe use a fixed exposure value?

Probably a good idea yeah. Keep in mind that the time for the pipeline switch isnt the stream time, its the time you get new values in code. Streams are put at a lower priority than actually getting the data (for obvious reasons).