Skip to content

Feature calibration offset#2

Open
Duke194 wants to merge 4 commits intoRobinR1:mainfrom
Duke194:feature_calibration_offset
Open

Feature calibration offset#2
Duke194 wants to merge 4 commits intoRobinR1:mainfrom
Duke194:feature_calibration_offset

Conversation

@Duke194
Copy link

@Duke194 Duke194 commented May 2, 2024

Added some features:

  • Calculation of distance:
    • Now includes a CALIBRATION_OFFSET that is beeing added and described in settings.h.example
    • Also the final distance is now an average of a buffer. The size is also added and described in settings.h.example
  • Some comments where added for usage with V2.0 of the board and also adjustments that are necessary for normal (not power saver) mode
  • Added config for ESP-WROOM-32 to platformio.ini

Improves reliability of measurements and enables calibration if your sensor has a offset.

@RobinR1: Beware you may want to change back line 105 (I switched from low power mode to standard mode, because I have no need for low power in my application).

Duke194 added 4 commits May 2, 2024 23:32
- Calculation of distance:
   * Now includes a CALIBRATION_OFFSET that is beeing added and described in settings.h.example
   * Also the final distance is now an average of a buffer. The size is also added and described in settings.h.example
- Some comments where added for usage with V2.0 of the board and also adjustments that are necessary for normal (not power saver) mode
- Added config for ESP-WROOM-32 to platformio.ini
You should be aware, this breaks pretty everything of your formerly used setup. I removed the whole part of your board and replaced it so it works with ESP32.

Also this will currently assume that you don't use a battery powered device. Maybe there should be a setting for that so we can switch this easily and support both modes.
@RobinR1
Copy link
Owner

RobinR1 commented May 8, 2024

Thanks for your contribution. I will try to review it in the near future.
Your changes look promising, especially the HA part, as I only recently started using HA, so it was already on my to-do list to revisit this code to integrate it with HA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants