After reading some forum posts, I now realize that the Modkit does not supported the EDR competition template. I saw a good post about this and switching the code from Modkit to RobotMesh. But, if what I laid out below works, then I think we can make an easier transition to VEX C++. We are looking at using the VEX C++ because it has a competition template and the Robot configuration tabs are the same for both the Modkit and VEX C++. (Moving to a full C++ language is a step too far for us this year.)
Will this work? Can we switch our Modkit’s Blocks to {M}Text for both the 15 sec Autonomous program and Usercontrol programs, and then copy them into the VEX C++’s Competition template?
For an example, I copied the {M}Text to MS Word, and then copied it into VEX C++’s Competition Template. When I did it, I noticed that the vertical separation and the tab’ing of the code disappeared. Each “WHEN” Control statement became a single sentence. Is this a problem? Is there anything else that we should lookout for? An example of the program for the Usercontrol section looks like:
void usercontrol( void ) {
// User control code here, inside the loop
while (1){
// This is the main execution loop for the user control program.
// Each time through the loop your program should update motor + servo
// values based on feedback from the joysticks.
// ........................................................................
// Insert user code here. This is where you use the joystick values to
// update your motors, etc.
The “WHEN” event system is not supported by C++, it’s specific to Modkit, so direct conversion of a Modkit project to C++ is not possible (unless lots of Modkit library code is also added and that’s not possible with VCS).
From your response, I was really concerned that we would not be able to translate the code from Modkit to VEX C++ in time. But, it really was not that hard. It was mainly syntax changes. A guy at work told me not to use MS Word as a text editor because it loses all the C++ formatting. He suggested I use any regular text editor. My computer has WordPad as one of the text editors and it worked great. The “Find and Replace” command was especially useful and made the whole job relatively easy. We were able to swap the WHEN commands out with an IF statement. For the WHEN Start command, we placed everything in a forever loop with a “while(1==1) {” statement.
Thank you for help!! Your comments have been most insightful.
For the others in the same boat, here are the syntax changes we had to do. This should help you get started. (When I typed this and now editing this post, everything below was nicely spaced. Just look for the semicolon to see the division between the two syntax.)