Skip to content

Adaptive sensitivity: auto-tune LiDAR Lite mode based on signal strength #3

@awickert

Description

@awickert

Summary

Once signal strength is exposed by the firmware (see NorthernWidget/Project-Apis#18), the library should optionally use it to automatically select the optimal SensitivityMode for current conditions.

Motivation

Conditions that affect LiDAR Lite return quality (target reflectivity, range, ambient light) vary in the field. Static sensitivity settings are a compromise. An adaptive loop could improve range and reduce false positives without manual reconfiguration.

Proposed approach

  • Add an opt-in autoSensitivity mode (off by default to preserve existing behaviour).
  • After each ranging cycle, read the signal strength value from firmware register 0x0A.
  • Apply a simple hysteresis scheme to switch between SensitivityMode values — avoid hunting between modes on noisy boundaries.
  • Write the new mode to firmware register 0x0B (config, writable) when a switch is warranted.

Notes

  • The feedback loop runs at the firmware's ~200 ms cadence; mode changes take effect on the next firmware cycle, so there is inherent lag. Keep the hysteresis wide enough to avoid oscillation.
  • A firmware-side implementation would be more responsive (direct LiDAR Lite register access), but the library approach is easier to iterate on without a firmware flash.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions