file
optical.hContents
- Reference
Contains prototypes for functions related to the VEX Optical sensor.
This file should not be modified by users, since it gets replaced whenever a kernel upgrade occurs.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http:/
Namespaces
Functions
- double optical_get_hue(uint8_t port)
- Get the detected color hue.
- double optical_get_saturation(uint8_t port)
- Get the detected color saturation.
- double optical_get_brightness(uint8_t port)
- Get the detected color brightness.
- int32_t optical_get_proximity(uint8_t port)
- Get the detected proximity value.
- int32_t optical_set_led_pwm(uint8_t port, uint8_t value)
- Set the pwm value of the White LED.
- int32_t optical_get_led_pwm(uint8_t port)
- Get the pwm value of the White LED.
-
optical_
rgb_ s_ t optical_get_rgb(uint8_t port) - Get the processed RGBC data from the sensor.
-
optical_
raw_ s_ t optical_get_raw(uint8_t port) - Get the raw, unprocessed RGBC data from the sensor.
- optical_direction_e_t optical_get_gesture(uint8_t port)
- Get the most recent gesture data from the sensor.
-
optical_
gesture_ s_ t optical_get_gesture_raw(uint8_t port) - Get the most recent raw gesture data from the sensor.
- int32_t optical_enable_gesture(uint8_t port)
- Enable gesture detection on the sensor.
- int32_t optical_disable_gesture(uint8_t port)
- Disable gesture detection on the sensor.
- double optical_get_integration_time(uint8_t port)
- Get integration time (update rate) of the optical sensor in milliseconds, with minimum time being.
- int32_t optical_set_integration_time(uint8_t port, double time)
- Set integration time (update rate) of the optical sensor in milliseconds.
Enums
- enum optical_direction_e { NO_GESTURE = 0, UP = 1, DOWN = 2, RIGHT = 3, LEFT = 4, ERROR = PROS_ERR }
Defines
- #define OPT_GESTURE_ERR
- #define OPT_COUNT_ERR
- #define OPT_TIME_ERR