Skip to content

Commit

Permalink
sf1xx: Fix max distance for SF/LW20/b
Browse files Browse the repository at this point in the history
  • Loading branch information
dvornikov-aa committed Sep 6, 2019
1 parent 6761746 commit e38c5d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/drivers/distance_sensor/sf1xx/parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @value 2 SF10/b
* @value 3 SF10/c
* @value 4 SF11/c
* @value 5 SF/LW20
* @value 5 SF/LW20/b
* @value 6 SF/LW20/c
*/
PARAM_DEFINE_INT32(SENS_EN_SF1XX, 0);
9 changes: 8 additions & 1 deletion src/drivers/distance_sensor/sf1xx/sf1xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,14 @@ SF1XX::init()
break;

case 5:
/* SF20/LW20 (100m 48-388Hz) */
/* SF/LW20/b (50m 48-388Hz) */
_min_distance = 0.001f;
_max_distance = 50.0f;
_conversion_interval = 20834;
break;

case 6:
/* SF/LW20/c (100m 48-388Hz) */
_min_distance = 0.001f;
_max_distance = 100.0f;
_conversion_interval = 20834;
Expand Down

0 comments on commit e38c5d5

Please sign in to comment.