diff --git a/third-party/realdds/src/dds-trinsics.cpp b/third-party/realdds/src/dds-trinsics.cpp index 352e820cb2..bf69d7d6b3 100644 --- a/third-party/realdds/src/dds-trinsics.cpp +++ b/third-party/realdds/src/dds-trinsics.cpp @@ -109,7 +109,27 @@ json video_intrinsics::to_json() const ret.principal_point.y = j[index++].get< float >(); ret.focal_length.x = j[index++].get< float >(); ret.focal_length.y = j[index++].get< float >(); - ret.distortion.model = (distortion_model)j[index++].get< int >(); + switch( j[index++].get< int >() ) + { + case 0: // RS2_DISTORTION_NONE + ret.distortion.model = distortion_model::none; + break; + + case 1: // RS2_DISTORTION_MODIFIED_BROWN_CONRADY + ret.distortion.model = distortion_model::modified_brown; + break; + + case 2: // RS2_DISTORTION_INVERSE_BROWN_CONRADY + ret.distortion.model = distortion_model::inverse_brown; + break; + + case 4: // RS2_DISTORTION_BROWN_CONRADY + ret.distortion.model = distortion_model::brown; + break; + + default: + DDS_THROW( runtime_error, "invalid legacy distortion model: " << j[index-1] ); + } ret.distortion.coeffs[0] = j[index++].get< float >(); ret.distortion.coeffs[1] = j[index++].get< float >(); ret.distortion.coeffs[2] = j[index++].get< float >(); diff --git a/third-party/realdds/src/topics/dds-topic-names.cpp b/third-party/realdds/src/topics/dds-topic-names.cpp index e12ab97476..a4002928ac 100644 --- a/third-party/realdds/src/topics/dds-topic-names.cpp +++ b/third-party/realdds/src/topics/dds-topic-names.cpp @@ -154,7 +154,7 @@ namespace reply { std::string const explanation( "explanation", 11 ); } namespace status { - std::string const ok( "ok", 2 ); + std::string const ok( "OK", 2 ); } namespace set_option { //using control::set_option::id;