Skip to content

Commit 4eddb5c

Browse files
authored
- Fix incorrect cast when intepretting quaterion data from UVC registers (#34)
1 parent 0add517 commit 4eddb5c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1414
<UseArtifactsOutput>true</UseArtifactsOutput>
1515
<PackageIcon>icon.png</PackageIcon>
16-
<VersionPrefix>0.3.3</VersionPrefix>
16+
<VersionPrefix>0.3.4</VersionPrefix>
1717
<VersionSuffix></VersionSuffix>
1818
<LangVersion>10.0</LangVersion>
1919
<Features>strict</Features>

OpenEphys.Miniscope/UclaMiniscopeV4.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ public UclaMiniscopeV4()
207207
// Get BNO data
208208
var q = new Quaternion
209209
{
210-
W = QuatConvFactor * (float)capture.GetProperty(CaptureProperty.Saturation),
211-
X = QuatConvFactor * (float)capture.GetProperty(CaptureProperty.Hue),
212-
Y = QuatConvFactor * (float)capture.GetProperty(CaptureProperty.Gain),
213-
Z = QuatConvFactor * (float)capture.GetProperty(CaptureProperty.Brightness)
210+
W = QuatConvFactor * (short)capture.GetProperty(CaptureProperty.Saturation),
211+
X = QuatConvFactor * (short)capture.GetProperty(CaptureProperty.Hue),
212+
Y = QuatConvFactor * (short)capture.GetProperty(CaptureProperty.Gain),
213+
Z = QuatConvFactor * (short)capture.GetProperty(CaptureProperty.Brightness)
214214
};
215215

216216
if (image == null)

0 commit comments

Comments
 (0)