View unanswered posts | View active topics It is currently Mon Sep 21, 2020 11:45 am

Reply to topic  [ 1 post ] 
REX Framework 
Author Message

Joined: Mon Jan 10, 2011 11:39 pm
Posts: 16
Post REX Framework
Howdy RobotC Community!

I thought I just might share something I have been working on.
In preparation for this weekend's New Zealand University Level Vex Robotics competition (more like friendly gathering with a BBQ) I decided to revive my old Framework.
But there was a problem! Many things in RobotC had changed and I just had to take advantage of the new features so I stripped out concepts and code from the old Framework instead.
Along with a bit of reading through the Wiki and the RobotC include files (including NatLang) I managed to find out some nifty features like "#pragma systemFile".

Basically the entire point of the Framework is to provide a lightweight singular API for doing everything.
You have four methods in the template: PreSetup (equiv to pre-auton), Autonomous and Driver (self explanatory), and Parallel (code to be executed in parallel regardless of competition state).
These are the main functions that are handled by the RexMain task which is started by either the custom lightweight competition control handler or by the legacy RobotC Competition include.
There are three functions which are kind of like your API: Controller (getting and setting controller channel values), Motor (setup motors, get and set values) and
Sensor (setup sensors, get and set values). You use these functions in replacement of the RobotC functions, although backwards compatibility has been taken in account so you can use either
method or a mix of both at the same time (by backwards compatibility I mean the RobotC motors and sensors setup, plus the RobotC variables/commands).

I haven't gotten around to making examples but the code should be commented enough to be understandable by experienced programmers.
Take a look and see if you like it, and please feel free to leave questions and feedback.

Attachments: [12.45 KiB]
Downloaded 578 times

Stefan Andres Charsley
Wed Nov 28, 2012 11:00 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests

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.