Update types

This commit is contained in:
John Zhao 2018-04-03 13:53:32 +08:00
parent 149ed6bdce
commit cd9af4fc48
3 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,10 @@ enum class Capabilities : std::uint8_t {
POINTS,
/** Provices fisheye stream */
FISHEYE,
/** Provices infrared stream */
INFRARED,
/** Provices second infrared stream */
INFRARED2,
/** Provices IMU (accelerometer, gyroscope) data */
IMU,
/** Last guard */

View File

@ -34,6 +34,8 @@ const char *to_string(const Capabilities &value) {
CASE(DEPTH)
CASE(POINTS)
CASE(FISHEYE)
CASE(INFRARED)
CASE(INFRARED2)
CASE(IMU)
default:
CHECK(is_valid(value));

View File

@ -22,6 +22,8 @@ TEST(Capabilities, VerifyToString) {
EXPECT_STREQ("Capabilities::DEPTH", to_string(Capabilities::DEPTH));
EXPECT_STREQ("Capabilities::POINTS", to_string(Capabilities::POINTS));
EXPECT_STREQ("Capabilities::FISHEYE", to_string(Capabilities::FISHEYE));
EXPECT_STREQ("Capabilities::INFRARED", to_string(Capabilities::INFRARED));
EXPECT_STREQ("Capabilities::INFRARED2", to_string(Capabilities::INFRARED2));
EXPECT_STREQ("Capabilities::IMU", to_string(Capabilities::IMU));
}