NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
Combined sensor type and mode constants

Use the combined sensor type and mode constants to configure both the sensor mode and type in a single function call. More...

Macros

#define _SENSOR_CFG(_type, _mode)   (((_type)<<8)+(_mode))
 
#define SENSOR_TOUCH   _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_BOOL)
 
#define SENSOR_LIGHT   _SENSOR_CFG(SENSOR_TYPE_LIGHT, SENSOR_MODE_PERCENT)
 
#define SENSOR_ROTATION   _SENSOR_CFG(SENSOR_TYPE_ROTATION, SENSOR_MODE_ROTATION)
 
#define SENSOR_CELSIUS   _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_CELSIUS)
 
#define SENSOR_FAHRENHEIT   _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_FAHRENHEIT)
 
#define SENSOR_PULSE   _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_PULSE)
 
#define SENSOR_EDGE   _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_EDGE)
 
#define SENSOR_NXTLIGHT   _SENSOR_CFG(SENSOR_TYPE_LIGHT_ACTIVE, SENSOR_MODE_PERCENT)
 
#define SENSOR_SOUND   _SENSOR_CFG(SENSOR_TYPE_SOUND_DB, SENSOR_MODE_PERCENT)
 
#define SENSOR_LOWSPEED_9V   _SENSOR_CFG(SENSOR_TYPE_LOWSPEED_9V, SENSOR_MODE_RAW)
 
#define SENSOR_LOWSPEED   _SENSOR_CFG(SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW)
 
#define SENSOR_COLORFULL   _SENSOR_CFG(SENSOR_TYPE_COLORFULL, SENSOR_MODE_RAW)
 
#define SENSOR_COLORRED   _SENSOR_CFG(SENSOR_TYPE_COLORRED, SENSOR_MODE_PERCENT)
 
#define SENSOR_COLORGREEN   _SENSOR_CFG(SENSOR_TYPE_COLORGREEN, SENSOR_MODE_PERCENT)
 
#define SENSOR_COLORBLUE   _SENSOR_CFG(SENSOR_TYPE_COLORBLUE, SENSOR_MODE_PERCENT)
 
#define SENSOR_COLORNONE   _SENSOR_CFG(SENSOR_TYPE_COLORNONE, SENSOR_MODE_PERCENT)
 

Detailed Description

Use the combined sensor type and mode constants to configure both the sensor mode and type in a single function call.

See Also
SetSensor()