Skip to content

Commit d506239

Browse files
committed
add toString conversion to printing StringBuilder
1 parent ad090ae commit d506239

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,27 @@ public DeviceDescriptor GetDeviceDescription()
9999
//print
100100
StringBuilder jsonPrinter = new StringBuilder(64);
101101
jsonPrinter.Append("FIELD OF VIEW:\n")
102-
.Append("monocular_horizontal = ").AppendLine( monocularHorizontal )
103-
.Append("monocular_vertical = ").AppendLine( monocularVertical )
104-
.Append("overlap_percent = ").AppendLine( overlapPercent )
105-
.Append("pitch_tilt = ").AppendLine( pitchTilt )
102+
.Append("monocular_horizontal = ").AppendLine( monocularHorizontal.toString() )
103+
.Append("monocular_vertical = ").AppendLine( monocularVertical.toString() )
104+
.Append("overlap_percent = ").AppendLine( overlapPercent.toString() )
105+
.Append("pitch_tilt = ").AppendLine( pitchTilt.toString() )
106106
.Append("\nRESOLUTION\n")
107-
.Append("width = ").AppendLine( width )
108-
.Append("height = ").AppendLine( height )
109-
.Append("video_inputs = ").AppendLine( videoInputs )
107+
.Append("width = ").AppendLine( width.toString() )
108+
.Append("height = ").AppendLine( height.toString() )
109+
.Append("video_inputs = ").AppendLine( videoInputs.toString() )
110110
.Append("display_mode = ").AppendLine( displayMode )
111111
.Append("\nDISTORTION\n")
112-
.Append("k1_red = ").AppendLine( k1Red )
113-
.Append("k1_green = ").AppendLine( k1Green )
114-
.Append("k1_blue = ").AppendLine( k1Blue )
112+
.Append("k1_red = ").AppendLine( k1Red.toString() )
113+
.Append("k1_green = ").AppendLine( k1Green.toString() )
114+
.Append("k1_blue = ").AppendLine( k1Blue.toString() )
115115
.Append("\nRENDERING\n")
116-
.Append("left_roll = ").AppendLine( leftRoll )
117-
.Append("right_roll = ").AppendLine( rightRoll )
116+
.Append("left_roll = ").AppendLine( leftRoll.toString() )
117+
.Append("right_roll = ").AppendLine( rightRoll.toString() )
118118
.Append("\nEYES\n")
119-
.Append("center_proj_x = ").AppendLine( centerProjX )
120-
.Append("center_proj_y = ").AppendLine( centerProjY )
121-
.Append("rotate_180 = ").AppendLine( rotate180 );
119+
.Append("center_proj_x = ").AppendLine( centerProjX.toString() )
120+
.Append("center_proj_y = ").AppendLine( centerProjY.toString() )
121+
.Append("rotate_180 = ").AppendLine( rotate180.toString() );
122+
Debug.Log("Parsed " + JsonDescriptorFile.name + ".json:\n" + jsonPrinter.ToString());
122123
Debug.Log("Parsed " + JsonDescriptorFile.name + ".json:\n" + jsonPrinter.ToString());
123124

124125
//create a device descriptor object and store the parsed json

0 commit comments

Comments
 (0)