Commit 0d65311
DEV-793 Address adversarial review: gyro sensitivity, block-ID guard, split-safe offsets, accel helpers
Review findings from PR #277 (all verified against code/datasheet before fixing):
1) K1: LSM6DSV gyro sensitivity now uses the ST datasheet angular-rate spec (4.375 mdps/LSB at +-125 dps, doubling per range - same as the gen-1 LSM6DS3) instead of a 32768/FS derivation, which was ~12.8% low. Verified: Test_029's rotation peak rescales 512 -> 586.9 dps, exactly the predicted x1.147.
2) CRITICAL: parseDataBlockMetaData now only accepts data-block IDs with parse support (<= LSM6DSV); the declared-but-unimplemented gen-2 IDs (LIGHT/ALGO_HUB/SKIN_TEMP/FLICKER) are rejected with the informative exception instead of corrupting the parse, and calculateFifoBlockSize throws instead of returning Integer.MIN_VALUE.
3) MAJOR: byte-offset arithmetic through the payload now uses a raw block size (getQtySensorDataBytesInDatablockRaw) that the midday/midnight CSV-split logic cannot recompute - the recomputed dataPacketSize*sampleCount is wrong for the variable-length LSM6DSV tagged FIFO.
4) MAJOR: isAnAccelEnabled/getPrimaryAccel/isSensorKeyAnAccel now include the LSM6DSV.
5) NIT: the LSM6DSV 'Sensor config:' line labels the mag rate 'Configured =' and appends the effective cap when it exceeds the IMU ODR.
6) Comment documenting why the gen-2 battery divider is gated on hardware revision rather than firmware version.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 04d884c commit 0d65311
5 files changed
Lines changed: 61 additions & 12 deletions
File tree
- ShimmerDriver/src/main/java/com/shimmerresearch/verisense
- payloaddesign
- sensors
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
| |||
1032 | 1034 | | |
1033 | 1035 | | |
1034 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1035 | 1040 | | |
1036 | 1041 | | |
1037 | 1042 | | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1038 | 1051 | | |
1039 | 1052 | | |
1040 | 1053 | | |
| |||
1237 | 1250 | | |
1238 | 1251 | | |
1239 | 1252 | | |
1240 | | - | |
| 1253 | + | |
| 1254 | + | |
1241 | 1255 | | |
1242 | 1256 | | |
1243 | 1257 | | |
1244 | 1258 | | |
1245 | 1259 | | |
1246 | 1260 | | |
1247 | | - | |
| 1261 | + | |
1248 | 1262 | | |
1249 | 1263 | | |
1250 | 1264 | | |
| |||
1623 | 1637 | | |
1624 | 1638 | | |
1625 | 1639 | | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1626 | 1645 | | |
1627 | 1646 | | |
1628 | 1647 | | |
| |||
1861 | 1880 | | |
1862 | 1881 | | |
1863 | 1882 | | |
1864 | | - | |
1865 | | - | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
1866 | 1890 | | |
1867 | 1891 | | |
1868 | 1892 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
| |||
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
108 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
410 | | - | |
| 413 | + | |
| 414 | + | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
| |||
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| |||
0 commit comments