@depz/sensor-sdk 0.2.1 → 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/README.md +13 -5
- package/dist/dataset.d.ts.map +1 -1
- package/dist/dataset.js +66 -2
- package/dist/dataset.js.map +1 -1
- package/dist/device/device.d.ts +6 -0
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +29 -6
- package/dist/device/device.js.map +1 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +25 -2
- package/dist/discovery.js.map +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol/bno055.d.ts +101 -0
- package/dist/protocol/bno055.d.ts.map +1 -0
- package/dist/protocol/bno055.js +105 -0
- package/dist/protocol/bno055.js.map +1 -0
- package/dist/protocol/identity.d.ts +1 -1
- package/dist/protocol/identity.d.ts.map +1 -1
- package/dist/protocol/identity.js +6 -0
- package/dist/protocol/identity.js.map +1 -1
- package/dist/protocol/vl53l7.d.ts +77 -0
- package/dist/protocol/vl53l7.d.ts.map +1 -0
- package/dist/protocol/vl53l7.js +99 -0
- package/dist/protocol/vl53l7.js.map +1 -0
- package/dist/protocol/vl53lx.d.ts +72 -0
- package/dist/protocol/vl53lx.d.ts.map +1 -0
- package/dist/protocol/vl53lx.js +87 -0
- package/dist/protocol/vl53lx.js.map +1 -0
- package/dist/sensors/bno055/bno055.d.ts +207 -0
- package/dist/sensors/bno055/bno055.d.ts.map +1 -0
- package/dist/sensors/bno055/bno055.js +547 -0
- package/dist/sensors/bno055/bno055.js.map +1 -0
- package/dist/sensors/bno055/regs.d.ts +271 -0
- package/dist/sensors/bno055/regs.d.ts.map +1 -0
- package/dist/sensors/bno055/regs.js +366 -0
- package/dist/sensors/bno055/regs.js.map +1 -0
- package/dist/sensors/bno086/bno086.d.ts +15 -0
- package/dist/sensors/bno086/bno086.d.ts.map +1 -1
- package/dist/sensors/bno086/bno086.js +43 -1
- package/dist/sensors/bno086/bno086.js.map +1 -1
- package/dist/sensors/bno086/sh2.d.ts.map +1 -1
- package/dist/sensors/bno086/sh2.js +5 -2
- package/dist/sensors/bno086/sh2.js.map +1 -1
- package/dist/sensors/reg-bridge.d.ts +35 -0
- package/dist/sensors/reg-bridge.d.ts.map +1 -0
- package/dist/sensors/reg-bridge.js +44 -0
- package/dist/sensors/reg-bridge.js.map +1 -0
- package/dist/sensors/vl53l4/vl53l4.d.ts.map +1 -1
- package/dist/sensors/vl53l4/vl53l4.js +18 -30
- package/dist/sensors/vl53l4/vl53l4.js.map +1 -1
- package/dist/sensors/vl53l7/vl53l7.d.ts +97 -0
- package/dist/sensors/vl53l7/vl53l7.d.ts.map +1 -0
- package/dist/sensors/vl53l7/vl53l7.js +138 -0
- package/dist/sensors/vl53l7/vl53l7.js.map +1 -0
- package/dist/sensors/vl53l8/assets/index.d.ts +5 -1
- package/dist/sensors/vl53l8/assets/index.d.ts.map +1 -1
- package/dist/sensors/vl53l8/assets/index.js +7 -1
- package/dist/sensors/vl53l8/assets/index.js.map +1 -1
- package/dist/sensors/vl53l8/assets/l7ch.d.ts +12 -0
- package/dist/sensors/vl53l8/assets/l7ch.d.ts.map +1 -0
- package/dist/sensors/vl53l8/assets/l7ch.js +18 -0
- package/dist/sensors/vl53l8/assets/l7ch.js.map +1 -0
- package/dist/sensors/vl53l8/assets/l7cx.d.ts +14 -0
- package/dist/sensors/vl53l8/assets/l7cx.d.ts.map +1 -0
- package/dist/sensors/vl53l8/assets/l7cx.js +20 -0
- package/dist/sensors/vl53l8/assets/l7cx.js.map +1 -0
- package/dist/sensors/vl53l8/cnh.d.ts +4 -3
- package/dist/sensors/vl53l8/cnh.d.ts.map +1 -1
- package/dist/sensors/vl53l8/cnh.js +4 -3
- package/dist/sensors/vl53l8/cnh.js.map +1 -1
- package/dist/sensors/vl53l8/uld.d.ts +50 -9
- package/dist/sensors/vl53l8/uld.d.ts.map +1 -1
- package/dist/sensors/vl53l8/uld.js +241 -35
- package/dist/sensors/vl53l8/uld.js.map +1 -1
- package/dist/sensors/vl53l8/vl53l8.d.ts +8 -3
- package/dist/sensors/vl53l8/vl53l8.d.ts.map +1 -1
- package/dist/sensors/vl53l8/vl53l8.js +41 -39
- package/dist/sensors/vl53l8/vl53l8.js.map +1 -1
- package/dist/sensors/vl53lx/decode.d.ts +70 -0
- package/dist/sensors/vl53lx/decode.d.ts.map +1 -0
- package/dist/sensors/vl53lx/decode.js +108 -0
- package/dist/sensors/vl53lx/decode.js.map +1 -0
- package/dist/sensors/vl53lx/uld/arith.d.ts +23 -0
- package/dist/sensors/vl53lx/uld/arith.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/arith.js +42 -0
- package/dist/sensors/vl53lx/uld/arith.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/core.d.ts +345 -0
- package/dist/sensors/vl53lx/uld/bare/core.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/core.js +1085 -0
- package/dist/sensors/vl53lx/uld/bare/core.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/driver.d.ts +91 -0
- package/dist/sensors/vl53lx/uld/bare/driver.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/driver.js +206 -0
- package/dist/sensors/vl53lx/uld/bare/driver.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/hist.d.ts +180 -0
- package/dist/sensors/vl53lx/uld/bare/hist.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/hist.js +949 -0
- package/dist/sensors/vl53lx/uld/bare/hist.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/image.d.ts +53 -0
- package/dist/sensors/vl53lx/uld/bare/image.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/image.js +108 -0
- package/dist/sensors/vl53lx/uld/bare/image.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/imath.d.ts +39 -0
- package/dist/sensors/vl53lx/uld/bare/imath.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/imath.js +99 -0
- package/dist/sensors/vl53lx/uld/bare/imath.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/index.d.ts +22 -0
- package/dist/sensors/vl53lx/uld/bare/index.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/index.js +22 -0
- package/dist/sensors/vl53lx/uld/bare/index.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/nvm.d.ts +85 -0
- package/dist/sensors/vl53lx/uld/bare/nvm.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/nvm.js +148 -0
- package/dist/sensors/vl53lx/uld/bare/nvm.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/regs.d.ts +54 -0
- package/dist/sensors/vl53lx/uld/bare/regs.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/regs.js +496 -0
- package/dist/sensors/vl53lx/uld/bare/regs.js.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/tuning.d.ts +15 -0
- package/dist/sensors/vl53lx/uld/bare/tuning.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/bare/tuning.js +303 -0
- package/dist/sensors/vl53lx/uld/bare/tuning.js.map +1 -0
- package/dist/sensors/vl53lx/uld/base.d.ts +129 -0
- package/dist/sensors/vl53lx/uld/base.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/base.js +166 -0
- package/dist/sensors/vl53lx/uld/base.js.map +1 -0
- package/dist/sensors/vl53lx/uld/l0x.d.ts +306 -0
- package/dist/sensors/vl53lx/uld/l0x.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/l0x.js +1492 -0
- package/dist/sensors/vl53lx/uld/l0x.js.map +1 -0
- package/dist/sensors/vl53lx/uld/l1.d.ts +69 -0
- package/dist/sensors/vl53lx/uld/l1.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/l1.js +262 -0
- package/dist/sensors/vl53lx/uld/l1.js.map +1 -0
- package/dist/sensors/vl53lx/uld/l3.d.ts +25 -0
- package/dist/sensors/vl53lx/uld/l3.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/l3.js +51 -0
- package/dist/sensors/vl53lx/uld/l3.js.map +1 -0
- package/dist/sensors/vl53lx/uld/l4.d.ts +22 -0
- package/dist/sensors/vl53lx/uld/l4.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/l4.js +99 -0
- package/dist/sensors/vl53lx/uld/l4.js.map +1 -0
- package/dist/sensors/vl53lx/uld/link.d.ts +42 -0
- package/dist/sensors/vl53lx/uld/link.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/link.js +28 -0
- package/dist/sensors/vl53lx/uld/link.js.map +1 -0
- package/dist/sensors/vl53lx/uld/registry.d.ts +68 -0
- package/dist/sensors/vl53lx/uld/registry.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/registry.js +139 -0
- package/dist/sensors/vl53lx/uld/registry.js.map +1 -0
- package/dist/sensors/vl53lx/uld/vl53l1-die.d.ts +172 -0
- package/dist/sensors/vl53lx/uld/vl53l1-die.d.ts.map +1 -0
- package/dist/sensors/vl53lx/uld/vl53l1-die.js +431 -0
- package/dist/sensors/vl53lx/uld/vl53l1-die.js.map +1 -0
- package/dist/sensors/vl53lx/vl53lx.d.ts +323 -0
- package/dist/sensors/vl53lx/vl53lx.d.ts.map +1 -0
- package/dist/sensors/vl53lx/vl53lx.js +688 -0
- package/dist/sensors/vl53lx/vl53lx.js.map +1 -0
- package/dist/transport/webserial.d.ts +4 -0
- package/dist/transport/webserial.d.ts.map +1 -1
- package/dist/transport/webserial.js +58 -12
- package/dist/transport/webserial.js.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stateless decoders of the blocks the 1D-family bridge streams (contract 12
|
|
3
|
+
* §4) — the "base" every SDK implements, pinned by `vectors/vl53lx.json`.
|
|
4
|
+
* Mirror of the Python `depz_sensor_sdk.vl53lx.decode`.
|
|
5
|
+
*
|
|
6
|
+
* - `decodeDieBlock` — the 17-byte VL53L1-die result block at 0x0089 (L1CX,
|
|
7
|
+
* L1CB, L3CX, L4CD, L4CX light drivers), fully decoded; the two ULDs that
|
|
8
|
+
* read it differ only in `DIE_VARIANTS`.
|
|
9
|
+
* - `decodeL0xRaw` — the raw fields of the VL53L0X 12-byte block at 0x14 (the
|
|
10
|
+
* PAL status and sigma need the device data cached at init).
|
|
11
|
+
* - `decodeHistogramRaw` — the status bytes and 24 photon bins of the
|
|
12
|
+
* 83-byte histogram block at 0x0088 (bins → targets is the full driver).
|
|
13
|
+
*/
|
|
14
|
+
import { beUint, floorDiv } from "./uld/arith.js";
|
|
15
|
+
import { RESULT_BLOCK_LEN as DIE_LEN, STATUS_RTN } from "./uld/vl53l1-die.js";
|
|
16
|
+
export const DIE_BLOCK_ADDR = 0x0089;
|
|
17
|
+
export const DIE_BLOCK_LEN = DIE_LEN;
|
|
18
|
+
export const L0X_BLOCK_ADDR = 0x14;
|
|
19
|
+
export const L0X_BLOCK_LEN = 12;
|
|
20
|
+
// Histogram block layout (Bare Driver register map, vl53lx_register_map.h).
|
|
21
|
+
const RESULT__HISTOGRAM_BIN_0_2 = 0x008e;
|
|
22
|
+
const RESULT__HISTOGRAM_BIN_23_0 = 0x00d5;
|
|
23
|
+
const PHASECAL_RESULT__REFERENCE_PHASE = 0x00d6;
|
|
24
|
+
const PHASECAL_RESULT__VCSEL_START = 0x00d8;
|
|
25
|
+
const RESULT__HISTOGRAM_BIN_23_0_MSB = 0x00d9;
|
|
26
|
+
const RESULT__HISTOGRAM_BIN_23_0_LSB = 0x00da;
|
|
27
|
+
export const HISTOGRAM_BLOCK_ADDR = 0x0088;
|
|
28
|
+
export const HISTOGRAM_BLOCK_LEN = RESULT__HISTOGRAM_BIN_23_0_LSB - HISTOGRAM_BLOCK_ADDR + 1;
|
|
29
|
+
export const HISTOGRAM_BINS = 24;
|
|
30
|
+
/**
|
|
31
|
+
* [signal-rate byte offset, per-SPAD scale K] of the two ULDs that read the
|
|
32
|
+
* die block: "l4" — VL53L4CD ULD (also L3CX ULP, L4CX-as-L4CD); "l1" —
|
|
33
|
+
* VL53L1X ULD (crosstalk-corrected peak signal at 0x0098, K = 25).
|
|
34
|
+
*/
|
|
35
|
+
export const DIE_VARIANTS = {
|
|
36
|
+
l4: [5, 256],
|
|
37
|
+
l1: [15, 25],
|
|
38
|
+
};
|
|
39
|
+
/** The 17-byte die block (0x0089..0x0099) as the named ULD reads it. */
|
|
40
|
+
export function decodeDieBlock(raw, variant = "l4") {
|
|
41
|
+
if (raw.length < DIE_BLOCK_LEN) {
|
|
42
|
+
throw new RangeError(`die result block needs ${DIE_BLOCK_LEN} bytes, got ${raw.length}`);
|
|
43
|
+
}
|
|
44
|
+
const v = DIE_VARIANTS[variant];
|
|
45
|
+
if (v === undefined)
|
|
46
|
+
throw new RangeError(`unknown die variant ${variant}`);
|
|
47
|
+
const [signalAt, k] = v;
|
|
48
|
+
let status = raw[0] & 0x1f;
|
|
49
|
+
if (status < STATUS_RTN.length)
|
|
50
|
+
status = STATUS_RTN[status];
|
|
51
|
+
const rawSpads = beUint(raw, 3, 5); // 8.8
|
|
52
|
+
const signal = beUint(raw, signalAt, signalAt + 2) * 8;
|
|
53
|
+
const ambient = beUint(raw, 7, 9) * 8;
|
|
54
|
+
return {
|
|
55
|
+
rangeStatus: status,
|
|
56
|
+
distanceMm: beUint(raw, 13, 15),
|
|
57
|
+
sigmaMm: floorDiv(beUint(raw, 9, 11), 4),
|
|
58
|
+
signalRateKcps: signal,
|
|
59
|
+
ambientRateKcps: ambient,
|
|
60
|
+
signalPerSpadKcps: rawSpads ? floorDiv(signal * k, rawSpads) : 0,
|
|
61
|
+
ambientPerSpadKcps: rawSpads ? floorDiv(ambient * k, rawSpads) : 0,
|
|
62
|
+
numberOfSpad: floorDiv(rawSpads, 256),
|
|
63
|
+
streamCount: raw[2],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/** Raw fields of the VL53L0X block at 0x14 (before the PAL status/sigma step). */
|
|
67
|
+
export function decodeL0xRaw(raw) {
|
|
68
|
+
if (raw.length < L0X_BLOCK_LEN) {
|
|
69
|
+
throw new RangeError(`VL53L0X result block needs ${L0X_BLOCK_LEN} bytes, got ${raw.length}`);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
distanceRaw: (raw[10] << 8) + raw[11],
|
|
73
|
+
deviceRangeStatus: raw[0],
|
|
74
|
+
signalRateMcps1616: ((raw[6] << 8) + raw[7]) * 512,
|
|
75
|
+
ambientRateMcps1616: ((raw[8] << 8) + raw[9]) * 512,
|
|
76
|
+
effectiveSpadCount88: (raw[2] << 8) + raw[3],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The 83-byte histogram block at 0x0088: status bytes and the 24 bins (bin
|
|
81
|
+
* 23's low byte is carried in a separate MSB/LSB pair and patched in first).
|
|
82
|
+
*/
|
|
83
|
+
export function decodeHistogramRaw(raw) {
|
|
84
|
+
if (raw.length < HISTOGRAM_BLOCK_LEN) {
|
|
85
|
+
throw new RangeError(`histogram block needs ${HISTOGRAM_BLOCK_LEN} bytes, got ${raw.length}`);
|
|
86
|
+
}
|
|
87
|
+
const off = HISTOGRAM_BLOCK_ADDR;
|
|
88
|
+
const buf = Uint8Array.from(raw);
|
|
89
|
+
buf[RESULT__HISTOGRAM_BIN_23_0 - off] =
|
|
90
|
+
((buf[RESULT__HISTOGRAM_BIN_23_0_MSB - off] << 2) + buf[RESULT__HISTOGRAM_BIN_23_0_LSB - off]) &
|
|
91
|
+
0xff;
|
|
92
|
+
const base = RESULT__HISTOGRAM_BIN_0_2 - off;
|
|
93
|
+
const bins = [];
|
|
94
|
+
for (let i = 0; i < HISTOGRAM_BINS; i++)
|
|
95
|
+
bins.push(beUint(buf, base + 3 * i, base + 3 * i + 3));
|
|
96
|
+
const ref = PHASECAL_RESULT__REFERENCE_PHASE - off;
|
|
97
|
+
return {
|
|
98
|
+
interruptStatus: buf[0],
|
|
99
|
+
rangeStatus: buf[1],
|
|
100
|
+
reportStatus: buf[2],
|
|
101
|
+
streamCount: buf[3],
|
|
102
|
+
dssActualEffectiveSpads: beUint(buf, 4, 6),
|
|
103
|
+
referencePhase: beUint(buf, ref, ref + 2),
|
|
104
|
+
vcselStart: buf[PHASECAL_RESULT__VCSEL_START - off],
|
|
105
|
+
bins,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=decode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.js","sourceRoot":"","sources":["../../../src/sensors/vl53lx/decode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AACnC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,4EAA4E;AAC5E,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAC1C,MAAM,gCAAgC,GAAG,MAAM,CAAC;AAChD,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAC5C,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAC9C,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,8BAA8B,GAAG,oBAAoB,GAAG,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAA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
|
|
1
|
+
/**
|
|
2
|
+
* Integer helpers for the ULD ports: Python-int semantics on JS numbers.
|
|
3
|
+
*
|
|
4
|
+
* The Python ports compute with unbounded ints and wrap on purpose where the
|
|
5
|
+
* C driver does (`& 0xFFFFFFFF`). JS bitwise operators work on 32-bit signed
|
|
6
|
+
* values, so any shift or mask that may see a value outside int32 goes
|
|
7
|
+
* through these helpers instead. Every value they take stays below 2^53
|
|
8
|
+
* (exact in a double); the sigma estimate of the VL53L0X, which can exceed
|
|
9
|
+
* that, runs on BigInt in `l0x.ts`.
|
|
10
|
+
*/
|
|
11
|
+
/** C uint32 wrap-around (`value & 0xFFFFFFFF` in Python, negatives included). */
|
|
12
|
+
export declare function u32(value: number): number;
|
|
13
|
+
/** Python `a // b` (floor division). */
|
|
14
|
+
export declare function floorDiv(a: number, b: number): number;
|
|
15
|
+
/** Python `a >> n` for any safe integer (floor semantics). */
|
|
16
|
+
export declare function shr(a: number, n: number): number;
|
|
17
|
+
/** Python `a << n` for any safe integer. */
|
|
18
|
+
export declare function shl(a: number, n: number): number;
|
|
19
|
+
/** Python `round(x)`: half to even. */
|
|
20
|
+
export declare function pyRound(x: number): number;
|
|
21
|
+
/** Big-endian unsigned integer of `b[start:end]`. */
|
|
22
|
+
export declare function beUint(b: Uint8Array, start: number, end: number): number;
|
|
23
|
+
//# sourceMappingURL=arith.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arith.d.ts","sourceRoot":"","sources":["../../../../src/sensors/vl53lx/uld/arith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,iFAAiF;AACjF,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzC;AAED,wCAAwC;AACxC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,8DAA8D;AAC9D,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,4CAA4C;AAC5C,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,uCAAuC;AACvC,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGzC;AAED,qDAAqD;AACrD,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIxE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integer helpers for the ULD ports: Python-int semantics on JS numbers.
|
|
3
|
+
*
|
|
4
|
+
* The Python ports compute with unbounded ints and wrap on purpose where the
|
|
5
|
+
* C driver does (`& 0xFFFFFFFF`). JS bitwise operators work on 32-bit signed
|
|
6
|
+
* values, so any shift or mask that may see a value outside int32 goes
|
|
7
|
+
* through these helpers instead. Every value they take stays below 2^53
|
|
8
|
+
* (exact in a double); the sigma estimate of the VL53L0X, which can exceed
|
|
9
|
+
* that, runs on BigInt in `l0x.ts`.
|
|
10
|
+
*/
|
|
11
|
+
const TWO32 = 4294967296;
|
|
12
|
+
/** C uint32 wrap-around (`value & 0xFFFFFFFF` in Python, negatives included). */
|
|
13
|
+
export function u32(value) {
|
|
14
|
+
const r = value % TWO32;
|
|
15
|
+
return r < 0 ? r + TWO32 : r;
|
|
16
|
+
}
|
|
17
|
+
/** Python `a // b` (floor division). */
|
|
18
|
+
export function floorDiv(a, b) {
|
|
19
|
+
return Math.floor(a / b);
|
|
20
|
+
}
|
|
21
|
+
/** Python `a >> n` for any safe integer (floor semantics). */
|
|
22
|
+
export function shr(a, n) {
|
|
23
|
+
return Math.floor(a / 2 ** n);
|
|
24
|
+
}
|
|
25
|
+
/** Python `a << n` for any safe integer. */
|
|
26
|
+
export function shl(a, n) {
|
|
27
|
+
return a * 2 ** n;
|
|
28
|
+
}
|
|
29
|
+
/** Python `round(x)`: half to even. */
|
|
30
|
+
export function pyRound(x) {
|
|
31
|
+
if (Math.abs(x % 1) === 0.5)
|
|
32
|
+
return 2 * Math.round(x / 2);
|
|
33
|
+
return Math.round(x);
|
|
34
|
+
}
|
|
35
|
+
/** Big-endian unsigned integer of `b[start:end]`. */
|
|
36
|
+
export function beUint(b, start, end) {
|
|
37
|
+
let v = 0;
|
|
38
|
+
for (let i = start; i < end; i++)
|
|
39
|
+
v = v * 256 + b[i];
|
|
40
|
+
return v;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=arith.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arith.js","sourceRoot":"","sources":["../../../../src/sensors/vl53lx/uld/arith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,iFAAiF;AACjF,MAAM,UAAU,GAAG,CAAC,KAAa;IAC/B,MAAM,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,CAAS;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAS;IACtC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAS;IACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACpB,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,OAAO,CAAC,CAAS;IAC/B,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG;QAAE,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,MAAM,CAAC,CAAa,EAAE,KAAa,EAAE,GAAW;IAC9D,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IACtD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uld/bare/core — preset modes, timing maths and the ranging cycle.
|
|
3
|
+
* Mirror of the Python `depz_sensor_sdk.vl53lx.uld.bare.core` (a faithful
|
|
4
|
+
* port of ST's VL53LX BareDriver C).
|
|
5
|
+
*
|
|
6
|
+
* This turns a set of tuning numbers into a device image and back:
|
|
7
|
+
* `VL53LX_read_p2p_data()` (the factory data), the
|
|
8
|
+
* `VL53LX_preset_mode_histogram_*()` builders, `VL53LX_set_timeouts_us()`,
|
|
9
|
+
* `VL53LX_init_and_start_range()` and `VL53LX_get_histogram_bin_data()`.
|
|
10
|
+
*
|
|
11
|
+
* **The device is configured in one shot.** Every preset builder edits the
|
|
12
|
+
* host-side image, and the span 0x0001..0x0087 goes out as one transfer when
|
|
13
|
+
* ranging starts.
|
|
14
|
+
*
|
|
15
|
+
* **Naming.** Methods are camelCase; the C structs (`HistogramBinData`,
|
|
16
|
+
* `HistPostProcessConfig`, register fields, NVM shapes) keep their C field
|
|
17
|
+
* names so they stay diffable against the Python and the C driver.
|
|
18
|
+
*
|
|
19
|
+
* **Integers.** Python `//`, `%`, `<<`, `>>` are mirrored through `imath.ts`
|
|
20
|
+
* (floor vs trunc, no 32-bit wrap); see there.
|
|
21
|
+
*/
|
|
22
|
+
import type { BridgePlatform } from "../base.js";
|
|
23
|
+
import { DeviceImage } from "./image.js";
|
|
24
|
+
import { NvmReader, type AdditionalOffsetCalData, type CalPeakRateMap, type OpticalCentre } from "./nvm.js";
|
|
25
|
+
import type { BlockName, RegBlock } from "./regs.js";
|
|
26
|
+
export declare const POWER_MANAGEMENT__GO1_POWER_FORCE = 131;
|
|
27
|
+
export declare const FIRMWARE__ENABLE = 133;
|
|
28
|
+
export declare const RESULT__OSC_CALIBRATE_VAL = 222;
|
|
29
|
+
export declare const PATCH__CTRL = 1136;
|
|
30
|
+
export declare const PATCH__JMP_ENABLES = 1138;
|
|
31
|
+
export declare const PATCH__DATA_ENABLES = 1140;
|
|
32
|
+
export declare const PATCH__OFFSET_0 = 1142;
|
|
33
|
+
export declare const PATCH__ADDRESS_0 = 1174;
|
|
34
|
+
export declare const HISTOGRAM_BIN_DATA_I2C_INDEX = 136;
|
|
35
|
+
export declare const RESULT__HISTOGRAM_BIN_0_2 = 142;
|
|
36
|
+
export declare const RESULT__HISTOGRAM_BIN_23_0 = 213;
|
|
37
|
+
export declare const PHASECAL_RESULT__REFERENCE_PHASE = 214;
|
|
38
|
+
export declare const PHASECAL_RESULT__VCSEL_START = 216;
|
|
39
|
+
export declare const RESULT__HISTOGRAM_BIN_23_0_MSB = 217;
|
|
40
|
+
export declare const RESULT__HISTOGRAM_BIN_23_0_LSB = 218;
|
|
41
|
+
export declare const HISTOGRAM_BIN_DATA_I2C_SIZE_BYTES: number;
|
|
42
|
+
export declare const DEVICEMEASUREMENTMODE_BACKTOBACK = 32;
|
|
43
|
+
export declare const DEVICEMEASUREMENTMODE_ABORT = 128;
|
|
44
|
+
export declare const DEVICEMEASUREMENTMODE_STOP_MASK = 15;
|
|
45
|
+
export declare const DEVICEMEASUREMENTMODE_MODE_MASK = 240;
|
|
46
|
+
export declare const DEVICESCHEDULERMODE_STREAMING = 1;
|
|
47
|
+
export declare const DEVICESCHEDULERMODE_HISTOGRAM = 2;
|
|
48
|
+
export declare const DEVICEREADOUTMODE_SINGLE_SD: number;
|
|
49
|
+
export declare const DEVICEREADOUTMODE_DUAL_SD: number;
|
|
50
|
+
export declare const GROUPEDPARAMETERHOLD_ID_MASK = 2;
|
|
51
|
+
export declare const INTERRUPT_CONFIG_NEW_SAMPLE_READY = 32;
|
|
52
|
+
export declare const CLEAR_RANGE_INT = 1;
|
|
53
|
+
export declare const RANGE_STATUS__RANGE_STATUS_MASK = 31;
|
|
54
|
+
export declare const DEVICEINTERRUPTPOLARITY_ACTIVE_LOW = 16;
|
|
55
|
+
export declare const DEVICEGPIOMODE_OUTPUT_RANGE_AND_ERROR_INTERRUPTS = 1;
|
|
56
|
+
export declare const DEVICEDSSMODE__TARGET_RATE = 1;
|
|
57
|
+
export declare const SEQUENCE_VHV_EN = 1;
|
|
58
|
+
export declare const SEQUENCE_PHASECAL_EN = 2;
|
|
59
|
+
export declare const SEQUENCE_DSS1_EN = 8;
|
|
60
|
+
export declare const SEQUENCE_DSS2_EN = 16;
|
|
61
|
+
export declare const SEQUENCE_MM1_EN = 32;
|
|
62
|
+
export declare const SEQUENCE_MM2_EN = 64;
|
|
63
|
+
export declare const SEQUENCE_RANGE_EN = 128;
|
|
64
|
+
export declare const SPAD_ARRAY_WIDTH = 16;
|
|
65
|
+
export declare const SPAD_ARRAY_HEIGHT = 16;
|
|
66
|
+
export declare const RTN_SPAD_APERTURE_TRANSMISSION = 56;
|
|
67
|
+
export declare const RTN_SPAD_UNITY_TRANSMISSION = 256;
|
|
68
|
+
export declare const AMBIENT_WINDOW_VCSEL_PERIODS = 256;
|
|
69
|
+
export declare const RANGING_WINDOW_VCSEL_PERIODS = 2048;
|
|
70
|
+
export declare const MACRO_PERIOD_VCSEL_PERIODS: number;
|
|
71
|
+
export declare const HISTOGRAM_BUFFER_SIZE = 24;
|
|
72
|
+
/** The three preset modes, by the distance mode that picks them. */
|
|
73
|
+
export declare const DISTANCE_MODES: readonly ["short", "medium", "long"];
|
|
74
|
+
export type DistanceMode = (typeof DISTANCE_MODES)[number];
|
|
75
|
+
export declare const TIMING_GUARD_US = 1700;
|
|
76
|
+
export declare const TIMING_DIVISOR = 6;
|
|
77
|
+
export declare const FDA_MAX_TIMING_BUDGET_US = 550000;
|
|
78
|
+
export declare function encodeRowCol(row: number, col: number): number;
|
|
79
|
+
/** → [row, col] */
|
|
80
|
+
export declare function decodeRowCol(spadNumber: number): [number, number];
|
|
81
|
+
/** → [width, height] */
|
|
82
|
+
export declare function decodeZoneSize(encodedXySize: number): [number, number];
|
|
83
|
+
export declare function encodeZoneSize(width: number, height: number): number;
|
|
84
|
+
/** → [x_ll, y_ll, x_ur, y_ur], clipped to the SPAD array. */
|
|
85
|
+
export declare function decodeZoneLimits(encodedXyCentre: number, encodedXySize: number): [number, number, number, number];
|
|
86
|
+
export declare function isApertureLocation(row: number, col: number): boolean;
|
|
87
|
+
/** → [mm inner, mm outer] effective SPADs, in 1/256 of a SPAD. */
|
|
88
|
+
export declare function calcMmEffectiveSpads(encodedMmRoiCentre: number, encodedMmRoiSize: number, encodedZoneCentre: number, encodedZoneSize: number, goodSpads: Uint8Array, apertureAttenuation: number): [number, number];
|
|
89
|
+
/**
|
|
90
|
+
* `VL53LX_hist_combine_mm1_mm2_offsets()` → `range_offset_mm`, in quarter
|
|
91
|
+
* millimetres. The two NVM offsets are weighted by the nominal MM1/MM2 peak
|
|
92
|
+
* rates scaled by the share of each region the ROI covers.
|
|
93
|
+
*/
|
|
94
|
+
export declare function combineMm1Mm2Offsets(mm1OffsetMm: number, mm2OffsetMm: number, encodedMmRoiCentre: number, encodedMmRoiSize: number, encodedZoneCentre: number, encodedZoneSize: number, calData: AdditionalOffsetCalData, goodSpads: Uint8Array, apertureAttenuation: number): number;
|
|
95
|
+
/** The 32 `global_config__spad_enables_rtn_*` bytes as one bitmap. */
|
|
96
|
+
export declare function rtnGoodSpads(nvmCopyData: RegBlock): Uint8Array;
|
|
97
|
+
export declare function calcPllPeriodUs(fastOscFrequency: number): number;
|
|
98
|
+
export declare function decodeVcselPeriod(vcselPeriodReg: number): number;
|
|
99
|
+
export declare function calcMacroPeriodUs(fastOscFrequency: number, vcselPeriodReg: number): number;
|
|
100
|
+
export declare function calcTimeoutMclks(timeoutUs: number, macroPeriodUs: number): number;
|
|
101
|
+
export declare function encodeTimeout(timeoutMclks: number): number;
|
|
102
|
+
export declare function decodeTimeout(encoded: number): number;
|
|
103
|
+
export declare function calcEncodedTimeout(timeoutUs: number, macroPeriodUs: number): number;
|
|
104
|
+
export declare function durationMaths(pllPeriodUs: number, vcselParmPclks: number, windowVclks: number, elapsedMclks: number): number;
|
|
105
|
+
/** Fill the six timeout registers, for VCSEL period A and then B. */
|
|
106
|
+
export declare function calcTimeoutRegisterValues(phasecalUs: number, mmUs: number, rangeUs: number, fastOscFrequency: number, genCfg: RegBlock, timCfg: RegBlock): void;
|
|
107
|
+
export declare const HIST_CFG_FIELDS: readonly ["low_amb_even_bin_0_1", "low_amb_even_bin_2_3", "low_amb_even_bin_4_5", "low_amb_odd_bin_0_1", "low_amb_odd_bin_2_3", "low_amb_odd_bin_4_5", "mid_amb_even_bin_0_1", "mid_amb_even_bin_2_3", "mid_amb_even_bin_4_5", "mid_amb_odd_bin_0_1", "mid_amb_odd_bin_2", "mid_amb_odd_bin_3_4", "mid_amb_odd_bin_5", "user_bin_offset", "high_amb_even_bin_0_1", "high_amb_even_bin_2_3", "high_amb_even_bin_4_5", "high_amb_odd_bin_0_1", "high_amb_odd_bin_2_3", "high_amb_odd_bin_4_5", "amb_thresh_low", "amb_thresh_high", "spad_array_selection"];
|
|
108
|
+
/**
|
|
109
|
+
* `VL53LX_histogram_config_t`. It has no registers of its own: the bin
|
|
110
|
+
* sequence is smuggled into static_config and timing_config fields that mean
|
|
111
|
+
* something else in lite mode, which `copyToStaticCfg()` does.
|
|
112
|
+
*/
|
|
113
|
+
export declare class HistConfig {
|
|
114
|
+
low_amb_even_bin_0_1: number;
|
|
115
|
+
low_amb_even_bin_2_3: number;
|
|
116
|
+
low_amb_even_bin_4_5: number;
|
|
117
|
+
low_amb_odd_bin_0_1: number;
|
|
118
|
+
low_amb_odd_bin_2_3: number;
|
|
119
|
+
low_amb_odd_bin_4_5: number;
|
|
120
|
+
mid_amb_even_bin_0_1: number;
|
|
121
|
+
mid_amb_even_bin_2_3: number;
|
|
122
|
+
mid_amb_even_bin_4_5: number;
|
|
123
|
+
mid_amb_odd_bin_0_1: number;
|
|
124
|
+
mid_amb_odd_bin_2: number;
|
|
125
|
+
mid_amb_odd_bin_3_4: number;
|
|
126
|
+
mid_amb_odd_bin_5: number;
|
|
127
|
+
user_bin_offset: number;
|
|
128
|
+
high_amb_even_bin_0_1: number;
|
|
129
|
+
high_amb_even_bin_2_3: number;
|
|
130
|
+
high_amb_even_bin_4_5: number;
|
|
131
|
+
high_amb_odd_bin_0_1: number;
|
|
132
|
+
high_amb_odd_bin_2_3: number;
|
|
133
|
+
high_amb_odd_bin_4_5: number;
|
|
134
|
+
amb_thresh_low: number;
|
|
135
|
+
amb_thresh_high: number;
|
|
136
|
+
spad_array_selection: number;
|
|
137
|
+
private get;
|
|
138
|
+
/**
|
|
139
|
+
* VL53LX_init_histogram_config_structure(): six even and six odd bin codes,
|
|
140
|
+
* packed two to a byte, then repeated across the three ambient levels.
|
|
141
|
+
*/
|
|
142
|
+
setBinSequence(even: readonly number[], odd: readonly number[]): void;
|
|
143
|
+
/** VL53LX_copy_hist_cfg_to_static_cfg(). */
|
|
144
|
+
copyToStaticCfg(staticCfg: RegBlock, timing: RegBlock, dynamic: RegBlock): void;
|
|
145
|
+
/**
|
|
146
|
+
* VL53LX_hist_get_bin_sequence_config(): which of the three sequences the
|
|
147
|
+
* device used for this frame, even or odd according to the stream count.
|
|
148
|
+
*/
|
|
149
|
+
binSequence(streamCount: number, ambientEventsSum: number): number[];
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* `VL53LX_hist_post_process_config_t`, as
|
|
153
|
+
* `VL53LX_init_hist_post_process_config_struct()` leaves it.
|
|
154
|
+
*/
|
|
155
|
+
export declare class HistPostProcessConfig {
|
|
156
|
+
hist_algo_select: number;
|
|
157
|
+
hist_target_order: number;
|
|
158
|
+
filter_woi0: number;
|
|
159
|
+
filter_woi1: number;
|
|
160
|
+
hist_amb_est_method: number;
|
|
161
|
+
ambient_thresh_sigma0: number;
|
|
162
|
+
ambient_thresh_sigma1: number;
|
|
163
|
+
ambient_thresh_events_scaler: number;
|
|
164
|
+
min_ambient_thresh_events: number;
|
|
165
|
+
noise_threshold: number;
|
|
166
|
+
signal_total_events_limit: number;
|
|
167
|
+
sigma_estimator__sigma_ref_mm: number;
|
|
168
|
+
sigma_thresh: number;
|
|
169
|
+
range_offset_mm: number;
|
|
170
|
+
gain_factor: number;
|
|
171
|
+
valid_phase_low: number;
|
|
172
|
+
valid_phase_high: number;
|
|
173
|
+
algo__consistency_check__phase_tolerance: number;
|
|
174
|
+
algo__consistency_check__event_sigma: number;
|
|
175
|
+
algo__consistency_check__event_min_spad_count: number;
|
|
176
|
+
algo__consistency_check__min_max_tolerance: number;
|
|
177
|
+
algo__crosstalk_compensation_enable: number;
|
|
178
|
+
algo__crosstalk_detect_min_valid_range_mm: number;
|
|
179
|
+
algo__crosstalk_detect_max_valid_range_mm: number;
|
|
180
|
+
algo__crosstalk_detect_max_valid_rate_kcps: number;
|
|
181
|
+
algo__crosstalk_detect_max_sigma_mm: number;
|
|
182
|
+
algo__crosstalk_detect_event_sigma: number;
|
|
183
|
+
algo__crosstalk_detect_min_max_tolerance: number;
|
|
184
|
+
algo__crosstalk_compensation_plane_offset_kcps: number;
|
|
185
|
+
algo__crosstalk_compensation_x_plane_gradient_kcps: number;
|
|
186
|
+
algo__crosstalk_compensation_y_plane_gradient_kcps: number;
|
|
187
|
+
constructor(xtalkCompensationEnable?: number);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* `VL53LX_histogram_bin_data_t`: 24 bins plus everything the post-processing
|
|
191
|
+
* needs to read them — the VCSEL period they were taken at, the phase of zero
|
|
192
|
+
* distance, the bin sequence and the ambient estimate. C field names kept.
|
|
193
|
+
*/
|
|
194
|
+
export declare class HistogramBinData {
|
|
195
|
+
result__interrupt_status: number;
|
|
196
|
+
result__range_status: number;
|
|
197
|
+
result__report_status: number;
|
|
198
|
+
result__stream_count: number;
|
|
199
|
+
result__dss_actual_effective_spads: number;
|
|
200
|
+
phasecal_result__reference_phase: number;
|
|
201
|
+
phasecal_result__vcsel_start: number;
|
|
202
|
+
bin_data: number[];
|
|
203
|
+
zone_id: number;
|
|
204
|
+
first_bin: number;
|
|
205
|
+
number_of_bins: number;
|
|
206
|
+
bins_in_data: number;
|
|
207
|
+
cal_config__vcsel_start: number;
|
|
208
|
+
vcsel_width: number;
|
|
209
|
+
fast_osc_frequency: number;
|
|
210
|
+
vcsel_period: number;
|
|
211
|
+
bin_seq: number[];
|
|
212
|
+
bin_rep: number[];
|
|
213
|
+
min_bin_value: number;
|
|
214
|
+
max_bin_value: number;
|
|
215
|
+
number_of_ambient_bins: number;
|
|
216
|
+
number_of_ambient_samples: number;
|
|
217
|
+
ambient_events_sum: number;
|
|
218
|
+
ambient_per_bin: number;
|
|
219
|
+
total_periods_elapsed: number;
|
|
220
|
+
peak_duration_us: number;
|
|
221
|
+
woi_duration_us: number;
|
|
222
|
+
zero_distance_phase: number;
|
|
223
|
+
roi_config__user_roi_centre_spad: number;
|
|
224
|
+
roi_config__user_roi_requested_global_xy_size: number;
|
|
225
|
+
get range_status(): number;
|
|
226
|
+
/** `copy.deepcopy()` — every field is a number or a number array. */
|
|
227
|
+
clone(): HistogramBinData;
|
|
228
|
+
}
|
|
229
|
+
export declare const DEVICESTATE_SW_STANDBY = "sw_standby";
|
|
230
|
+
export declare const DEVICESTATE_RANGING_WAIT_GPH_SYNC = "wait_gph_sync";
|
|
231
|
+
export declare const DEVICESTATE_RANGING_OUTPUT_DATA = "output_data";
|
|
232
|
+
export declare const DEVICESTATE_RANGING_DSS_AUTO = "dss_auto";
|
|
233
|
+
export declare class LLState {
|
|
234
|
+
cfg_device_state: string;
|
|
235
|
+
cfg_stream_count: number;
|
|
236
|
+
cfg_gph_id: number;
|
|
237
|
+
cfg_timing_status: number;
|
|
238
|
+
rd_device_state: string;
|
|
239
|
+
rd_stream_count: number;
|
|
240
|
+
rd_gph_id: number;
|
|
241
|
+
rd_timing_status: number;
|
|
242
|
+
reset(): void;
|
|
243
|
+
updateRd(modeStart: number, groupedParameterHold: number): void;
|
|
244
|
+
updateCfg(modeStart: number): void;
|
|
245
|
+
}
|
|
246
|
+
export interface FmtDmaxCal {
|
|
247
|
+
ref__actual_effective_spads: number;
|
|
248
|
+
ref__peak_signal_count_rate_mcps: number;
|
|
249
|
+
ref__distance_mm: number;
|
|
250
|
+
ref_reflectance_pc: number;
|
|
251
|
+
coverglass_transmission: number;
|
|
252
|
+
}
|
|
253
|
+
export interface MmRoi {
|
|
254
|
+
x_centre: number;
|
|
255
|
+
y_centre: number;
|
|
256
|
+
width: number;
|
|
257
|
+
height: number;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* The VL53LX BareDriver's ranging path, on top of `DeviceImage`. It owns what
|
|
261
|
+
* the C driver keeps in `VL53LX_LLDriverData_t` and nowhere else: the factory
|
|
262
|
+
* data that has no registers, the histogram config, the post-process config
|
|
263
|
+
* and the timeouts.
|
|
264
|
+
*/
|
|
265
|
+
export declare class BareDriver {
|
|
266
|
+
readonly p: BridgePlatform;
|
|
267
|
+
readonly img: DeviceImage;
|
|
268
|
+
readonly nvm: NvmReader;
|
|
269
|
+
readonly tuning: Record<string, number>;
|
|
270
|
+
histCfg: HistConfig;
|
|
271
|
+
hpp: HistPostProcessConfig;
|
|
272
|
+
rtnGoodSpads: Uint8Array;
|
|
273
|
+
opticalCentre: OpticalCentre | null;
|
|
274
|
+
calPeakRateMap: CalPeakRateMap | null;
|
|
275
|
+
addOffCalData: AdditionalOffsetCalData | null;
|
|
276
|
+
fmtDmaxCal: FmtDmaxCal | null;
|
|
277
|
+
mmRoi: MmRoi | null;
|
|
278
|
+
result__osc_calibrate_val: number;
|
|
279
|
+
presetMode: DistanceMode;
|
|
280
|
+
phasecalConfigTimeoutUs: number;
|
|
281
|
+
mmConfigTimeoutUs: number;
|
|
282
|
+
rangeConfigTimeoutUs: number;
|
|
283
|
+
interMeasurementPeriodMs: number;
|
|
284
|
+
measurementMode: number;
|
|
285
|
+
readonly state: LLState;
|
|
286
|
+
private ambientEventsSum;
|
|
287
|
+
constructor(p: BridgePlatform);
|
|
288
|
+
/** Pull the factory data: three register blocks and four NVM regions. */
|
|
289
|
+
readP2pData(): Promise<void>;
|
|
290
|
+
/**
|
|
291
|
+
* Everything the L3CX API does between boot and the first start: read the
|
|
292
|
+
* factory data, take the default preset mode and the default timing budget.
|
|
293
|
+
*/
|
|
294
|
+
dataInit(): Promise<void>;
|
|
295
|
+
/** VL53LX_set_preset_mode() for the three histogram ranging modes. */
|
|
296
|
+
setPresetMode(mode?: string, dssTargetMcps?: number | null, interMeasurementPeriodMs?: number | null): void;
|
|
297
|
+
private tp;
|
|
298
|
+
/**
|
|
299
|
+
* `VL53LX_get_device_results()` recomputes `hpp.range_offset_mm` every frame
|
|
300
|
+
* under MM1_MM2_OFFSETS; its inputs are the factory data and the user ROI,
|
|
301
|
+
* so once per preset is the same answer for less work.
|
|
302
|
+
*/
|
|
303
|
+
private updateRangeOffset;
|
|
304
|
+
/**
|
|
305
|
+
* VL53LX_SetDistanceMode(): the preset mode, with the timeouts put back
|
|
306
|
+
* afterwards (the preset alone would reset them to its own defaults).
|
|
307
|
+
*/
|
|
308
|
+
setDistanceMode(mode: string): void;
|
|
309
|
+
/** VL53LX_preset_mode_standard_ranging(): the base of every histogram mode. */
|
|
310
|
+
private presetModeStandardRanging;
|
|
311
|
+
/** VL53LX_preset_mode_histogram_ranging(): standard ranging, then histogram. */
|
|
312
|
+
private presetModeHistogramRanging;
|
|
313
|
+
/** The shape all three histogram distance modes share. */
|
|
314
|
+
private presetTail;
|
|
315
|
+
setTimeoutsUs(phasecalUs: number, mmUs: number, rangeUs: number): void;
|
|
316
|
+
setInterMeasurementPeriodMs(periodMs: number): void;
|
|
317
|
+
/**
|
|
318
|
+
* VL53LX_SetMeasurementTimingBudgetMicroSeconds(): the range timeout is one
|
|
319
|
+
* sixth of the budget after a fixed guard comes off.
|
|
320
|
+
*/
|
|
321
|
+
setMeasurementTimingBudgetUs(budgetUs: number): void;
|
|
322
|
+
/** VL53LX_load_patch(): a six-instruction phasecal patch. */
|
|
323
|
+
loadPatch(): Promise<void>;
|
|
324
|
+
unloadPatch(): Promise<void>;
|
|
325
|
+
private enablePowerforce;
|
|
326
|
+
private disablePowerforce;
|
|
327
|
+
/**
|
|
328
|
+
* Write the configuration and start. `blocks` is ST's config level: all of
|
|
329
|
+
* them to start, general_config onwards to clear the interrupt.
|
|
330
|
+
*/
|
|
331
|
+
initAndStartRange(blocks?: readonly BlockName[]): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* VL53LX_clear_interrupt_and_enable_next_range(): in histogram mode the
|
|
334
|
+
* interrupt is cleared by rewriting general_config onwards.
|
|
335
|
+
*/
|
|
336
|
+
clearInterruptAndStartNextRange(): Promise<void>;
|
|
337
|
+
stopRange(): Promise<void>;
|
|
338
|
+
/**
|
|
339
|
+
* One frame: the 83-byte block decoded into bins plus the metadata the
|
|
340
|
+
* post-processing needs. Pure (no bus access): the caller reads or receives
|
|
341
|
+
* the block. Stateful: carries the ambient sum to the next frame.
|
|
342
|
+
*/
|
|
343
|
+
getHistogramBinData(raw: Uint8Array): HistogramBinData;
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../../src/sensors/vl53lx/uld/bare/core.ts"],"names":[],"mappings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