Pros Competition Code

So I wanted to try out PROS, it looks interesting, plus I could probably do more with this compared to EasyC, which doesn’t let you do much.
I started watching Highwayman’s series on it, good so far. But If I wanted to use this as our competition code, would I update the firmware on the cortex so that it has PROS firmware instead of EasyC firmware?
How would I make it so that the code is competition code? (In pros, in atom+pros).
Also, are there any other series besides Highwayman’s on how to start with PROS?

edit: I’m having a problem with the code, I typed out what Highwayman had in EP.2 since the text wasn’t in op control when I started. I’m getting an error message saying “main.h: No Such file or directory at line 35 col 18”

/** @file opcontrol.c
 * @brief File for operator control code
 *
 * This file should contain the user operatorControl() function and any functions related to it.
 *
 * Copyright (c) 2011-2014, Purdue University ACM SIG BOTS.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Purdue University ACM SIG BOTS nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL PURDUE UNIVERSITY ACM SIG BOTS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Purdue Robotics OS contains FreeRTOS (http://www.freertos.org) whose source code may be
 * obtained from http://sourceforge.net/projects/freertos/files/ or on request.
 */

#include "main.h"

/*
 * Runs the user operator control code. This function will be started in its own task with the
 * default priority and stack size whenever the robot is enabled via the Field Management System
 * or the VEX Competition Switch in the operator control mode. If the robot is disabled or
 * communications is lost, the operator control task will be stopped by the kernel. Re-enabling
 * the robot will restart the task, not resume it from where it left off.
 *
 * If no VEX Competition Switch or Field Management system is plugged in, the VEX Cortex will
 * run the operator control task. Be warned that this will also occur if the VEX Cortex is
 * tethered directly to a computer via the USB A to A cable without any VEX Joystick attached.
 *
 * Code running in this task can take almost any action, as the VEX Joystick is available and
 * the scheduler is operational. However, proper use of delay() or taskDelayUntil() is highly
 * recommended to give other tasks (including system tasks such as updating LCDs) time to run.
 *
 * This task should never exit; it should end with some kind of infinite loop, even if empty.
 */
void operatorControl() {

	while (1) {
		delay(20);
	}
}

No need; PROS doesn’t use firmware like RobotC and EasyC. All you need to do is run the PROS upload code command.

You don’t need to do anything special. PROS automatically uses a competition-ready code structure (


initialize()

,


autonomous()

,


operatorControl()

).

I’ve been meaning to get around to making one, but something called time keeps getting in the way.

What exactly is giving the error – the linter (through Atom) or the command-line output upon compiling? Post a screenshot if you’re not sure what I’m asking.
Have you moved/renamed/deleted any files since first creating the PROS project?

I’m not positive of what you mean by “the text wasn’t already in op control,” but this makes me suspicious that your pros project wasn’t set up correctly. Like Barin suggested, posting a screenshot of PROS should be helpful.

@Barin, tell me about it. Maybe after I find an internship and get my conference paper finished and submitted, and after states I’ll have time to pick this series back up again. sigh

Ah. Ok cool. So in PROS there are no error messages but when I copy and paste it into ATOM (using pros) that’s when the error message shows up. I don’t think I’ve messed around with any files, but I might have without noticing. I attached a screenshot.
Screenshot (imgur)

Do you mean in the terminal (Command Prompt) upon compilation? PROS itself has no GUI, so it’s not entirely clear what you mean.

For the linter to work correctly, you must load the root project directory into Atom as a PROS project. That way Atom and the linter can see your


include

folder and


main.h

in it. Also make sure you save, as I don’t think the linter works in realtime.

Errors will update in real time, but it doesn’t start until you either save or edit an open file. So if you have a file with errors in it, and you open it up in Atom, linter won’t tell you of any errors until you either hit ctrl-s or make an edit. Once it ‘starts’ though it will update as you type.

One more thing, How would I load it directly into atom as a root project?

You’ll want to get info from @Highwayman / @edjubuh / @hotel about that; I don’t use Atom.

It should be as simple as going File>Add Project Folder, and then selecting the root folder of your project.

That being said, if you were able to successfully make a PROS project from inside Atom (PROS>Create new PROS Project), it should add the project to the tree view automatically.

I would like to know if there is a way to test auto in PROS.

The easiest way is to use a competition switch yourself.

The faster way I have my students do it is to use an otherwise unused button on the controller and have the entire autonomous code activated by that button. Then they can test it whenever, even without the competition switch. This is easiest if you make a separate file, accessing that file from both the autonomous task and the button on the remote.