WP: add default values
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
a5e5128740
commit
5e5cf793db
1 changed files with 5 additions and 4 deletions
|
@ -12,12 +12,13 @@ namespace PipeTap.Logic.WirePlumber {
|
|||
public int value { get { return _value; } set { _value = value; send_value(value); } }
|
||||
public CtrlType ctrl_type { get; }
|
||||
|
||||
public Ctrl(CtrlType pt_type, Wp.Node node, uint id, string type, float min, float max) {
|
||||
public Ctrl(CtrlType pt_type, Wp.Node node, uint id, string type, float min, float max, float typ) {
|
||||
this.node = node;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.wp_type = type;
|
||||
this.id = id;
|
||||
_value = (int) ((typ - min) / (max - min) * 1000);
|
||||
_ctrl_type = pt_type;
|
||||
}
|
||||
|
||||
|
@ -123,7 +124,7 @@ namespace PipeTap.Logic.WirePlumber {
|
|||
break;
|
||||
}
|
||||
message("Found EXPOSURE");
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.Exposure, node, id, type, 0, 2);
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.Exposure, node, id, type, 0, 2, 1);
|
||||
found_ctrls.append(ctrl);
|
||||
break;
|
||||
case "LensPosition":
|
||||
|
@ -132,7 +133,7 @@ namespace PipeTap.Logic.WirePlumber {
|
|||
break;
|
||||
}
|
||||
message("Found FOCUS");
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.Focus, node, id, type, 0, 100);
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.Focus, node, id, type, 0, 100, 50);
|
||||
found_ctrls.append(ctrl);
|
||||
break;
|
||||
case "AeEnable":
|
||||
|
@ -141,7 +142,7 @@ namespace PipeTap.Logic.WirePlumber {
|
|||
break;
|
||||
}
|
||||
message("Found AE enable");
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.ExposureEnable, node, id, type, 0, 1);
|
||||
var ctrl = new Ctrl(Logic.Ctrl.CtrlType.ExposureEnable, node, id, type, 0, 1, 1);
|
||||
found_ctrls.append(ctrl);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue