Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
3377ec18
Commit
3377ec18
authored
7 years ago
by
DanielePettenuzzo
Committed by
Beat Küng
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vl53lxx driver: add saturation when distance goes beyond max_distance
parent
ad49509b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/drivers/distance_sensor/vl53lxx/vl53lxx.cpp
+7
-3
7 additions, 3 deletions
src/drivers/distance_sensor/vl53lxx/vl53lxx.cpp
with
7 additions
and
3 deletions
src/drivers/distance_sensor/vl53lxx/vl53lxx.cpp
+
7
−
3
View file @
3377ec18
...
...
@@ -72,8 +72,6 @@
#include
<board_config.h>
#define NAN_F 0.0F/0.0F
/* Configuration Constants */
#ifdef PX4_I2C_BUS_EXPANSION3
#define VL53LXX_BUS PX4_I2C_BUS_EXPANSION3 // I2C port (I2C4) on fmu-v5
...
...
@@ -659,7 +657,13 @@ VL53LXX::collect()
report
.
timestamp
=
hrt_absolute_time
();
report
.
type
=
distance_sensor_s
::
MAV_DISTANCE_SENSOR_LASER
;
report
.
orientation
=
_rotation
;
report
.
current_distance
=
distance_m
;
if
(
distance_m
>
2.0
f
){
report
.
current_distance
=
2.0
f
;
}
else
{
report
.
current_distance
=
distance_m
;
}
report
.
min_distance
=
VL53LXX_MIN_RANGING_DISTANCE
;
report
.
max_distance
=
VL53LXX_MAX_RANGING_DISTANCE
;
report
.
covariance
=
0.0
f
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment