Add API to get light sensor signals

This commit is contained in:
jacobperron 2016-04-01 15:28:34 -07:00
parent d63d02f058
commit e234d705f9
5 changed files with 173 additions and 14 deletions

View file

@ -403,13 +403,35 @@ namespace create {
*/
bool isLightBumperCenterRight() const;
//TODO (https://github.com/AutonomyLab/libcreate/issues/3)
//uint16_t getDistLeft() const;
//uint16_t getDistFrontLeft() const;
//uint16_t getDistCenterLeft() const;
//uint16_t getDistRight() const;
//uint16_t getDistFrontRight() const;
//uint16_t getDistCenterRight() const;
/* Return the signal strength from the left light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalLeft() const;
/* Return the signal strength from the front-left light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalFrontLeft() const;
/* Return the signal strength from the center-left light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalCenterLeft() const;
/* Return the signal strength from the right light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalRight() const;
/* Return the signal strength from the front-right light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalFrontRight() const;
/* Return the signal strength from the center-right light sensor.
* \return value in range [0, 4095]
*/
uint16_t getLightSignalCenterRight() const;
/* Return true if Create is moving forward, false otherwise.
*/