Skip to content

Commit e568231

Browse files
committed
Update to latest plugin API
1 parent 8d1e23c commit e568231

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.modules/OpenTabletDriver

Submodule OpenTabletDriver updated 141 files

Filter/MeL/Filter/MeLFilter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ public Vector2 Filter(Vector2 point)
3131

3232
public FilterStage FilterStage => FilterStage.PostTranspose;
3333

34-
[Property("Offset"), Unit("ms")]
34+
[Property("Offset"), Unit("ms"), DefaultPropertyValue(0)]
3535
public float Offset { set; get; }
3636

37-
[Property("Samples")]
37+
[Property("Samples"), DefaultPropertyValue(20)]
3838
public int Samples { set => Core.Samples = value; }
3939

40-
[Property("Complexity")]
40+
[Property("Complexity"), DefaultPropertyValue(2)]
4141
public int Complexity { set => Core.Complexity = value; }
4242

43-
[Property("Weight")]
43+
[Property("Weight"), DefaultPropertyValue(1.4f)]
4444
public float Weight { set => Core.Weight = value; }
4545

4646
private readonly MLCore Core = new MLCore();

Filter/MeL/Interpolator/MeLInterp.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ public override SyntheticTabletReport Interpolate()
4343
return SyntheticReport;
4444
}
4545

46-
[Property("Samples")]
46+
[Property("Samples"), DefaultPropertyValue(20)]
4747
public int Samples { set => Core.Samples = value; }
4848

49-
[Property("Complexity")]
49+
[Property("Complexity"), DefaultPropertyValue(2)]
5050
public int Complexity { set => Core.Complexity = value; }
5151

52-
[Property("Weight")]
52+
[Property("Weight"), DefaultPropertyValue(1.4f)]
5353
public float Weight { set => Core.Weight = value; }
5454

5555
private readonly MLCore Core = new MLCore();
5656
private SyntheticTabletReport SyntheticReport;
57-
private new DateTime lastTime;
57+
private DateTime lastTime;
5858
private new double reportMsAvg = 4.0;
5959
}
6060
}

Filter/PrecisionControl/PrecisionControl.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class PrecisionControl: IBinding, IValidateBinding, IFilter
1212
private static Vector2 StartingPoint;
1313
private static bool IsActive { set; get; }
1414
private static bool SetPosition { set; get; }
15+
16+
[Property("Property")]
1517
public string Property { set; get; }
1618

1719
public Action Press => () =>
@@ -50,8 +52,8 @@ public Vector2 Filter(Vector2 OriginalPoint)
5052
}
5153
}
5254

53-
[SliderProperty("Precision Multiplier", 0.0f, 10f, 0.3f)]
54-
public float Scale { get; set; } = 0.3f;
55+
[SliderProperty("Precision Multiplier", 0.0f, 10f, 0.3f), DefaultPropertyValue(0.3f)]
56+
public float Scale { get; set; }
5557

5658
public FilterStage FilterStage => FilterStage.PostTranspose;
5759
}

Filter/Reconstructor/Reconstructor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ private static Vector2 ReverseEMAFunc(Vector2 currentEMA, Vector2 lastEMA, float
2222
return ((currentEMA - lastEMA) / weight) + lastEMA;
2323
}
2424

25-
[Property("EMA Weight"), ToolTip
25+
[Property("EMA Weight"), DefaultPropertyValue(0.5f), ToolTip
2626
(
27-
"Default: 0.35\n\n" +
27+
"Default: 0.5\n\n" +
2828
"Defines the weight of the latest sample against previous ones [Range: 0.0 - 1.0]\n" +
2929
" Lower == More hardware smoothing removed\n" +
3030
" 1 == No effect"
3131
)]
32-
public double EMAWeight
32+
public float EMAWeight
3333
{
3434
set
3535
{
3636
weight = Math.Clamp(value, 0, 1);
3737
}
3838
get => weight;
3939
}
40-
private double weight;
40+
private float weight;
4141

4242
public FilterStage FilterStage => FilterStage.PreInterpolate;
4343
}

0 commit comments

Comments
 (0)