Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix legacy intrinsics serialization and uppercase 'OK' status #12822

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion third-party/realdds/src/dds-trinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 >() )
OhadMeir marked this conversation as resolved.
Show resolved Hide resolved
{
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 >();
Expand Down
2 changes: 1 addition & 1 deletion third-party/realdds/src/topics/dds-topic-names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading