All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexdefault.c File Reference

Implementation of the cortex default code. More...

#include <stdlib.h>
#include "ch.h"
#include "hal.h"
#include "vex.h"

Macros

#define JUMPER_IN   0
 
#define JUMPER_OUT   1
 

Functions

void vexCortexDefaultSetup (void)
 Cortex default code initialization. More...
 
void vexCortexDefaultDriver (void)
 Cortex default code. More...
 

Detailed Description

Implementation of the cortex default code.

Jumpers and ports are used as follows
Motors by default: + CW, - CCW
Jumper IN  = 0
Jumper OUT = 1
Analog IN  = 5
Analog OUT = 249
jmp1  = IN: motor 1  reversed
jmp2  = IN: motor 2  reversed
jmp3  = IN: motor 3  reversed
jmp4  = IN: motor 4  reversed
jmp5  = IN: motor 5  reversed
jmp6  = IN: motor 6  reversed
jmp7  = IN: motor 7  reversed
jmp8  = IN: motor 8  reversed
jmp9  = IN: motor 9  reversed
jmp10 = IN: motor 10 reversed
jmp11 = OUT && jmp12 = OUT: Single Driver TANK
jmp11 =  IN && jmp12 = OUT: Dual Driver   TANK
jmp11 = OUT && jmp12 =  IN: Single Driver ARCADE
jmp11 =  IN && jmp12 =  IN: Dual Driver   ARCADE
ana1  < 200: motor 6 IGNORE CCW
ana2  < 200: motor 6 IGNORE CW
ana3  < 200: motor 7 IGNORE CCW
ana4  < 200: motor 7 IGNORE CW
ana5  < 200: motor 8 IGNORE CCW
ana6  < 200: motor 8 IGNORE CW
ana7  < 200: motor 9 IGNORE CCW
ana8  < 200: motor 9 IGNORE CW

Macro Definition Documentation

#define JUMPER_IN   0

Jumper in pulls digital port low

Examples:
vexdefault.c.
#define JUMPER_OUT   1

Jumper out allows digital port to be pulled high

Examples:
vexdefault.c.

Function Documentation

void vexCortexDefaultSetup ( void  )

Cortex default code initialization.

Setup motors and digital ports

Examples:
vexdefault.c.
void vexCortexDefaultDriver ( void  )

Cortex default code.

This function simulates the cortex default code, it was based on the ROBOTC implementation but with some changes in structure.

Examples:
vexdefault.c.