dev #33

Merged
faicel merged 34 commits from dev into staging 2026-09-04 20:58:47 +00:00
Owner
No description provided.
ODR code 0b1000 is 1.620 kHz in low-power mode per the datasheet
(en.DM00091513), not 1.6 kHz: report 1620.0 Hz from sample_rate and
1_620_000 milli-Hz internally. Rename DataRate::Hz_1600_LP to
Hz_1620_LP (breaking). Data-ready timeout unchanged: two periods at
1.62 kHz round below the 5 ms floor, which still dominates. Add tests
for the 1620 Hz sample rate and the unchanged timeout floor.
read_acceleration and try_read_acceleration no longer re-read CTRL_REG1
and CTRL_REG4 on every sample: the cached range/power mode/data rate,
maintained by every setter and the with_attached write-back, is
authoritative. Each read now costs 2 I2C transactions (STATUS poll +
OUT_X..Z burst) instead of 4. sync_measurement_config stays for the
sample_rate path. Tests encoding the 4-transaction sequence are updated
to the 2-transaction sequence; the resync tests become cache-coherence
tests (set_range(G4) then read scales from the cached G4 with zero extra
config transactions).
Add rust-version = 1.73 (floor imposed by u32::div_ceil in the data-ready
timeout helper), repository and readme fields. Version stays 1.0.14 until
the 2.0.0 release.
The local entrypoint now executes, in order: version sync, CI helper
unit tests, cargo fmt --all -- --check, cargo clippy --locked
--all-targets -- -D warnings, RUSTDOCFLAGS="-D warnings" cargo doc
--no-deps --locked, and cargo test --locked -- --nocapture. Every
cargo invocation is locked so a run is reproducible from Cargo.lock
alone. The README Tests section documents the exact sequence.
- Compute self-test deltas in i32 with the absolute value taken before
  any conversion, so the full raw i16 span cannot overflow (removes the
  debug-build panic / no_std abort path when diagnosing broken hardware)
- Report deltas in digits of the configured power mode (raw difference
  divided by 16/64/256 for high resolution/normal/low power, rounded to
  nearest; max 4096 digits, i16 fields unchanged)
- Convert SelfTestLimits from the datasheet's physical 68-1440 mg
  self-test window (only the +-2g normal 17-360 LSB limits are
  published) with integer ceil/floor instead of the inverted sensitivity
  ratio; document datasheet provenance
- Add extreme no-panic, delta-symmetry and 12-combination limits-table
  tests; update pass/fail mocks to consistent units
set_interrupt_threshold and set_interrupt_duration now return
InvalidConfiguration for values greater than 127 instead of silently
truncating to the 7-bit register width (the 0x7F mask is kept before the
write as defense-in-depth). configure_motion_detection validates the
configured threshold and duration up front and configure_free_fall
extends its early check to the duration, so an invalid configuration
performs zero I2C transactions and can never leave partially-modified
hardware behind. In-range values are unaffected.
fix workflow
All checks were successful
Run checks on feature branches / rust-crate-checks (push) Successful in 22s
Run checks on feature branches / checks (push) Successful in 0s
Validate branch flow / validate-flow (pull_request_target) Successful in 1s
Validate branch flow / validate (pull_request_target) Successful in 0s
d9492cbc56
Merge branch 'dev' into fix/audit-security-lis2dh12
All checks were successful
Run checks on feature branches / rust-crate-checks (push) Successful in 17s
Run checks on feature branches / checks (push) Successful in 0s
Validate branch flow / validate-flow (pull_request_target) Successful in 1s
Validate branch flow / validate (pull_request_target) Successful in 0s
569fc4287c
Merge pull request '## [2.0.0] - 2026-09-03' (#31) from fix/audit-security-lis2dh12 into dev
All checks were successful
Create tag on dev / rust-crate-checks (push) Successful in 17s
Create tag on dev / checks (push) Successful in 0s
Create tag on dev / tag_prerelease (push) Successful in 7s
Create tag on dev / tag (push) Successful in 0s
Publish release on tag / rust-crate-checks (push) Successful in 16s
Publish release on tag / checks (push) Successful in 0s
Publish release on tag / release_on_tag (push) Successful in 12s
Publish release on tag / publish (push) Successful in 0s
837f7a9658
Reviewed-on: #31
update workflow
All checks were successful
Run checks on feature branches / rust-crate-checks (push) Successful in 19s
Run checks on feature branches / checks (push) Successful in 0s
Validate branch flow / validate-flow (pull_request_target) Successful in 2s
Validate branch flow / validate (pull_request_target) Successful in 0s
4b6a99ac90
Merge branch 'dev' into fix/workflow
All checks were successful
Validate branch flow / validate-flow (pull_request_target) Successful in 2s
Validate branch flow / validate (pull_request_target) Successful in 0s
Run checks on feature branches / rust-crate-checks (push) Successful in 17s
Run checks on feature branches / checks (push) Successful in 0s
135342d553
Merge pull request 'update workflow' (#32) from fix/workflow into dev
All checks were successful
Create tag on dev / tag_prerelease (push) Successful in 8s
Create tag on dev / tag (push) Successful in 0s
Create tag on dev / rust-crate-checks (push) Successful in 18s
Create tag on dev / checks (push) Successful in 0s
Validate branch flow / validate-flow (pull_request_target) Successful in 2s
Validate branch flow / validate (pull_request_target) Successful in 0s
Publish release on tag / rust-crate-checks (push) Successful in 17s
Publish release on tag / checks (push) Successful in 0s
Publish release on tag / release_on_tag (push) Successful in 11s
Publish release on tag / publish (push) Successful in 0s
5d3c865ac6
Reviewed-on: #32
faicel merged commit 0407b018f6 into staging 2026-09-04 20:58:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
homeiot/lis2dh12!33
No description provided.