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

ROBOTC style sensor interface. More...

#include "ch.h"
#include "hal.h"
#include "vex.h"

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.

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