View unanswered posts | View active topics It is currently Mon Aug 03, 2020 5:16 pm

Reply to topic  [ 2 posts ] 
Cortex/VexNet Autonomous Mode Switching --- Newbie question 
Author Message

Joined: Mon Feb 28, 2011 6:59 pm
Posts: 4
Post Cortex/VexNet Autonomous Mode Switching --- Newbie question

I'm a veteran computer teacher, but a newbie to robotics and RobotC. We are trying to program our Cortex controllers using the code in the sample programs and in the Robot C curriculum for the squarebot 2.0 and 3.0.

We are able to program autonomously without issues (we came from Parallax Basic Stamps so coding in RobotC is a simple translation).

We are able to program in "Radio Control" mode using the Vexnet controllers by just plugging in the VexNet keys and going.

The problem is that we cannot get in or out of autonomous mode in the same program. bIfiAutonomousMode is mentioned in the curriculum. I think it's an error and we are supposed to use bVexAutonomousMode (which is indicated in the sample programs). But NEITHER works at all when we try to compile a program. We get a "Can't assign to read only const variable" if we try to switch modes.

What's up with this? If the variable is hard switched based on whether the VexNet keys are plugged in, how do we get out of that mode?

Thanks...hope this is a simple question and I just missed something somewhere...


Tue Mar 01, 2011 12:35 pm
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 409
Post Re: Cortex/VexNet Autonomous Mode Switching --- Newbie question
Hi Gary,

the bIfiAutonomousMode and bVexAutonomousMode variables are only needed for the older VEX PIC platform, not the VEX Cortex. When you want the robot to perform an autonomous operation in a program, just include autonomous code; when you want it to perform remote control operations, include remote control code. If your robot is synced over VEXnet, there's no extra hurdles to switch from one mode to another.

We have videos that demonstrate this in the Remote Control section of our VEX Cortex Video Trainer:

Jesse Flot
CMU Robotics Academy
ROBOTC Support

Tue Mar 08, 2011 11:45 am
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.