Knowing if field competition switch is connected

In this thread (https://vexforum.com/t/recognizing-whether-or-not-competition-control-is-plugged-in/23199/1) it says that you can use nVexRCReceiveState & vrCompetitionSwitch to see if a competition switch is connected, but is their way to tell if you are connected to the competition field (http://www.vexrobotics.com/event-partners/275-1401.html) vs a regular switch (http://www.vexrobotics.com/276-2335.html)? There is a difference between them as stated in a thread that I can not find.? There is a difference between them as stated in a thread that I can not find.)

) it says that you can use nVexRCReceiveState & vrCompetitionSwitch to see if a competition switch is connected, but is their way to tell if you are connected to the competition field (http://www.vexrobotics.com/event-partners/275-1401.html) vs a regular switch (http://www.vexrobotics.com/276-2335.html)? There is a difference between them as stated in a thread that I can not find.? There is a difference between them as stated in a thread that I can not find.)

I’m going to take a stab in the dark here and say that the user processor probably doesn’t know, and thus you cannot know. AFAIK, the only difference between the two switches is that field control first switches VexNET to a different channel, probably through a command which the master processor intercepts. Otherwise they’re basically identical.

Another case where James will likely correct me but, no harm in guessing :).

Why do you want this capability?

When we practice and have a switch connected, I want the cortex to display different debug info than during a real match. I was thinking the same as what you said about the master processor controling that, not the user.

I would suggest just using a jumper pin in one of the sensor ports (or a 3-wire extension cable from one of the sensor ports) where plugged in is, say, “practice” mode and unplugged is “competition” mode. Then just check for its presence in the code.

I suppose it isn’t quite as convenient but I can’t imagine it being, like, a huge hassle.

Here is a usage guide of nVexRCReceiveState: ROBOTC
If there is such a feature, it can not be found in that variable.

Taking a glance through the ConVEX source code, it looks like an identical variable is being read directly from the master processor. In other words, the master processor generates this one var to represent “competition state” and it’s doubtful that they would be sending another message with whether or not the field control is plugged in, especially since there’s 2 unused flags in this competition control var.

I don’t think you are able to distinguish between the two. The field control grounds an additional pin on the competition port, this instructs the joystick to use channel 1 (joystick is mostly in charge of the WiFi). I will simulate this when I have a chance but I don’t believe this status is available anywhere in the cortex.

Could you possibly post instructions for how to do this? We have some keys which don’t seem to work on field control but work fine otherwise and it’d be nice to be able to test this somehow without sacrificing matches or buying a competition control system.

I made a custom Ethernet cable that has pin 6 shorted to ground so that it simulates the field switches.

https://vexforum.com/showpost.php?p=277480&postcount=48

When I had to make it, I used a multimeter to see what pin was different on a regular switch and a field switch, as well as the grounds and then striped the wires and shorted them

EDIT

Because you do not have a field switch, you can find what side of the cable is pin 1 by finding the side that has the disable/enable and the drive/autonomous by measuring the resistance between that and what you think is pin 1 on the regular switch. Then knowing where pin 7 is see what color it’s wire is, strip the casing off the cable and short pin 7’s wire to ground.

When I had to make it, I used a multimeter to see what pin was different on a regular switch and a field switch, as well as the grounds and then striped the wires and shorted them

Yes, that’s basically what I do. I have a home made competition switch and I just add the extra connection between pin 6 (I think) and ground.

Here’s my competition switch, I need to make something better sometime.

https://vexforum.com/showpost.php?p=235768&postcount=9