Skip to content

Commit

Permalink
Fix wia camera property reading
Browse files Browse the repository at this point in the history
  • Loading branch information
dukus committed Dec 17, 2015
1 parent 46d5360 commit 6d98ea7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CameraControl.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.3.52.0")]
[assembly: AssemblyFileVersion("1.3.52.0")]
[assembly: AssemblyVersion("1.3.54.0")]
[assembly: AssemblyFileVersion("1.3.54.0")]
11 changes: 10 additions & 1 deletion CameraControl.Devices/Others/WiaCameraDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
double d = (int) subTypeValue;
string s = "f/" + (d/100).ToString("0.0");
FNumber.AddValues(s, (int) d);
FNumber.ReloadValues();
if ((int) subTypeValue == (int) apertureProperty.get_Value())
FNumber.SetValue((int) d);
}
Expand All @@ -246,6 +247,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
foreach (var subTypeValue in isoProperty.SubTypeValues)
{
IsoNumber.AddValues(subTypeValue.ToString(), (int) subTypeValue);
IsoNumber.ReloadValues();
if ((int) subTypeValue == (int) isoProperty.get_Value())
IsoNumber.SetValue((int) subTypeValue);
}
Expand All @@ -266,6 +268,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (ShutterTable.ContainsKey((int) subTypeValue))
ShutterSpeed.AddValues(ShutterTable[(int) subTypeValue], (int) subTypeValue);
}
ShutterSpeed.ReloadValues();
ShutterSpeed.SetValue(shutterProperty.get_Value());
}
}
Expand All @@ -284,6 +287,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (WbTable.ContainsKey((int) subTypeValue))
WhiteBalance.AddValues(WbTable[(int) subTypeValue], (int) subTypeValue);
}
WhiteBalance.ReloadValues();
WhiteBalance.SetValue(wbProperty.get_Value());
}
}
Expand All @@ -302,6 +306,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (ExposureModeTable.ContainsKey((int) subTypeValue))
Mode.AddValues(ExposureModeTable[(int) subTypeValue], Convert.ToUInt32(subTypeValue));
}
Mode.ReloadValues();
Mode.SetValue(Convert.ToUInt32(modeProperty.get_Value()));
}
Mode.IsEnabled = false;
Expand All @@ -324,6 +329,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
s = "+" + s;
ExposureCompensation.AddValues(s, (int) subTypeValue);
}
ExposureCompensation.ReloadValues();
ExposureCompensation.SetValue(ecProperty.get_Value());
}
}
Expand All @@ -342,6 +348,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (CSTable.ContainsKey((int) subTypeValue))
CompressionSetting.AddValues(CSTable[(int) subTypeValue], (int) subTypeValue);
}
CompressionSetting.ReloadValues();
CompressionSetting.SetValue(csProperty.get_Value());
}
}
Expand All @@ -360,7 +367,8 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (EMMTable.ContainsKey((int) subTypeValue))
ExposureMeteringMode.AddValues(EMMTable[(int) subTypeValue], (int) subTypeValue);
}
CompressionSetting.SetValue(emmProperty.get_Value());
ExposureMeteringMode.ReloadValues();
ExposureMeteringMode.SetValue(emmProperty.get_Value());
}
}
catch (COMException)
Expand All @@ -379,6 +387,7 @@ public override bool Init(DeviceDescriptor deviceDescriptor)
if (FMTable.ContainsKey(subval))
FocusMode.AddValues(FMTable[subval], subval);
}
FocusMode.ReloadValues();
FocusMode.SetValue(Convert.ToUInt16((int) fmProperty.get_Value()));
}
}
Expand Down
4 changes: 2 additions & 2 deletions CameraControl/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.3.52.0")]
[assembly: AssemblyFileVersion("1.3.52.0")]
[assembly: AssemblyVersion("1.3.54.0")]
[assembly: AssemblyFileVersion("1.3.54.0")]
2 changes: 1 addition & 1 deletion Setup/wix/Setup.g.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<Property Id="ARPPRODUCTICON" Value="app_icon.ico" />

<WixVariable Id="WixUILicenseRtf" Value="f:\devel\vs2010\CameraControl\CameraControl\bin\Release\Licenses\DigiCamControlLicence.rtf" />
<WixVariable Id="WixUILicenseRtf" Value="f:\devel\vs2010\CameraControl\CameraControl\bin\Debug\Licenses\DigiCamControlLicence.rtf" />

<Upgrade Id="357e0d80-5093-478e-8c11-28b1a72096e7">
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="1.0.0.0" IncludeMaximum="no" Property="UPGRADEFOUND" />
Expand Down

0 comments on commit 6d98ea7

Please sign in to comment.