All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vexsensor.h File Reference

ROBOTC style sensor interface macros and prototypes. More...

Go to the source code of this file.

Enumerations

enum  tVexSensors {
  kVexSensorUndefined = -1, kVexSensorAnalog_1 = 0, kVexSensorAnalog_2 = 1, kVexSensorAnalog_3 = 2,
  kVexSensorAnalog_4 = 3, kVexSensorAnalog_5 = 4, kVexSensorAnalog_6 = 5, kVexSensorAnalog_7 = 6,
  kVexSensorAnalog_8 = 7, kVexSensorDigital_1 = 8, kVexSensorDigital_2 = 9, kVexSensorDigital_3 = 10,
  kVexSensorDigital_4 = 11, kVexSensorDigital_5 = 12, kVexSensorDigital_6 = 13, kVexSensorDigital_7 = 14,
  kVexSensorDigital_8 = 15, kVexSensorDigital_9 = 16, kVexSensorDigital_10 = 17, kVexSensorDigital_11 = 18,
  kVexSensorDigital_12 = 19, kVexSensorIme_1 = 20, kVexSensorIme_2 = 21, kVexSensorIme_3 = 22,
  kVexSensorIme_4 = 23, kVexSensorIme_5 = 24, kVexSensorIme_6 = 25, kVexSensorIme_7 = 26,
  kVexSensorIme_8 = 27
}
 sensor types for vexSensorValue More...
 

Functions

bool_t vexSensorIsAnalog (tVexSensors sensor)
 Get the value of a sensor port. More...
 
int32_t vexSensorValueGet (tVexSensors sensor)
 Get the value of a sensor port. More...
 
void vexSensorValueSet (tVexSensors sensor, int32_t value)
 Set the value of a sensor port. More...
 

Detailed Description

ROBOTC style sensor interface macros and prototypes.

Enumeration Type Documentation

sensor types for vexSensorValue

Note
A ROBOTC style sensor interface to make porting code easier
Enumerator
kVexSensorUndefined 
kVexSensorAnalog_1 
kVexSensorAnalog_2 
kVexSensorAnalog_3 
kVexSensorAnalog_4 
kVexSensorAnalog_5 
kVexSensorAnalog_6 
kVexSensorAnalog_7 
kVexSensorAnalog_8 
kVexSensorDigital_1 
kVexSensorDigital_2 
kVexSensorDigital_3 
kVexSensorDigital_4 
kVexSensorDigital_5 
kVexSensorDigital_6 
kVexSensorDigital_7 
kVexSensorDigital_8 
kVexSensorDigital_9 
kVexSensorDigital_10 
kVexSensorDigital_11 
kVexSensorDigital_12 
kVexSensorIme_1 
kVexSensorIme_2 
kVexSensorIme_3 
kVexSensorIme_4 
kVexSensorIme_5 
kVexSensorIme_6 
kVexSensorIme_7 
kVexSensorIme_8 

Function Documentation

bool_t vexSensorIsAnalog ( tVexSensors  sensor)

Get the value of a sensor port.

Parameters
[in]sensorA sensor of type tVexSensors
Returns
TRUE if the port is an analog sensor
int32_t vexSensorValueGet ( tVexSensors  sensor)

Get the value of a sensor port.

Parameters
[in]sensorA sensor of type tVexSensors
Returns
The value of the current sensor.
Note
A ROBOTC compatibility function
void vexSensorValueSet ( tVexSensors  sensor,
int32_t  value 
)

Set the value of a sensor port.

Parameters
[in]sensorA sensor of type tVexSensors
[in]valueValue to set the sensor to.
Note
A ROBOTC compatibility function