com.shinolab.autd3-sdk.core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Config.cs
CHANGED
|
@@ -12,7 +12,7 @@ namespace AUTD3
|
|
|
12
12
|
|
|
13
13
|
public readonly struct LoopBehavior
|
|
14
14
|
{
|
|
15
|
-
|
|
15
|
+
public ushort Rep { get; }
|
|
16
16
|
|
|
17
17
|
private LoopBehavior(ushort rep)
|
|
18
18
|
{
|
|
@@ -37,16 +37,27 @@ namespace AUTD3
|
|
|
37
37
|
{
|
|
38
38
|
internal byte Mode { get; }
|
|
39
39
|
internal ulong Value { get; }
|
|
40
|
+
internal uint MarginNs { get; }
|
|
40
41
|
|
|
41
|
-
private TransitionMode(byte mode, ulong value)
|
|
42
|
+
private TransitionMode(byte mode, ulong value, uint marginNs = 0)
|
|
42
43
|
{
|
|
43
44
|
Mode = mode;
|
|
44
45
|
Value = value;
|
|
46
|
+
MarginNs = marginNs;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
public static TransitionMode SyncIdx => new TransitionMode(0x00, 0);
|
|
48
50
|
|
|
49
|
-
public static TransitionMode SysTime(DcSysTime sysTime
|
|
51
|
+
public static TransitionMode SysTime(DcSysTime sysTime, TimeSpan? margin = null)
|
|
52
|
+
{
|
|
53
|
+
if (margin is not { } m) return new TransitionMode(0x01, sysTime.SysTime);
|
|
54
|
+
var nanos = (double)m.Ticks * 100.0;
|
|
55
|
+
if (nanos < 0.0 || nanos > uint.MaxValue)
|
|
56
|
+
{
|
|
57
|
+
throw new Autd3Exception("transition margin is out of range (0..=4294967295 ns)");
|
|
58
|
+
}
|
|
59
|
+
return new TransitionMode(0x01, sysTime.SysTime, (uint)nanos);
|
|
60
|
+
}
|
|
50
61
|
|
|
51
62
|
public static TransitionMode Gpio(GpioIn gpio) => new TransitionMode(0x02, (byte)gpio);
|
|
52
63
|
|
|
@@ -54,4 +65,14 @@ namespace AUTD3
|
|
|
54
65
|
|
|
55
66
|
public static TransitionMode Immediate => new TransitionMode(0xFF, 0);
|
|
56
67
|
}
|
|
68
|
+
|
|
69
|
+
public enum Telemetry : byte
|
|
70
|
+
{
|
|
71
|
+
FifoDrop = 0x00,
|
|
72
|
+
Dedup = 0x01,
|
|
73
|
+
SeqMismatch = 0x02,
|
|
74
|
+
DispatchError = 0x03,
|
|
75
|
+
Processed = 0x04,
|
|
76
|
+
Failsafe = 0x05,
|
|
77
|
+
}
|
|
57
78
|
}
|
package/Geometry.cs
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/THIRD-PARTY-LICENSES.md
CHANGED
|
@@ -654,9 +654,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
654
654
|
|
|
655
655
|
Used by:
|
|
656
656
|
|
|
657
|
-
- autd3-ffi-abi 0.
|
|
658
|
-
- autd3-ffi-core 0.
|
|
659
|
-
- autd3-rs-core 0.
|
|
657
|
+
- autd3-ffi-abi 0.3.0 — https://github.com/shinolab/autd3-sdk
|
|
658
|
+
- autd3-ffi-core 0.3.0 — https://github.com/shinolab/autd3-sdk
|
|
659
|
+
- autd3-rs-core 0.3.0 — https://github.com/shinolab/autd3-sdk
|
|
660
660
|
- chrono 0.4.45 — https://github.com/chronotope/chrono
|
|
661
661
|
- wide 1.5.0 — https://github.com/Lokathor/wide
|
|
662
662
|
|
package/Units.cs
CHANGED
|
@@ -54,15 +54,15 @@ namespace AUTD3
|
|
|
54
54
|
|
|
55
55
|
public readonly struct Freq
|
|
56
56
|
{
|
|
57
|
-
|
|
57
|
+
public enum FreqMode : byte
|
|
58
58
|
{
|
|
59
59
|
FloatExact = 0,
|
|
60
60
|
IntExact = 1,
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
public FreqMode Mode { get; }
|
|
64
64
|
internal float HzValue { get; }
|
|
65
|
-
|
|
65
|
+
public uint HzIntValue { get; }
|
|
66
66
|
|
|
67
67
|
internal Freq(FreqMode mode, float hz, uint hzInt)
|
|
68
68
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.shinolab.autd3-sdk.core",
|
|
3
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "git+https://github.com/shinolab/autd3-sdk.git",
|
|
6
|
+
"directory": "bindings/unity/com.shinolab.autd3-sdk.core"
|
|
7
|
+
},
|
|
8
|
+
"version": "0.3.0",
|
|
4
9
|
"displayName": "AUTD3 Core",
|
|
5
10
|
"description": "AUTD3 core types, geometry and units (Unity binding).",
|
|
6
11
|
"unity": "6000.0",
|