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
d2a0c857
Unverified
Commit
d2a0c857
authored
5 years ago
by
Burak Han
Committed by
Beat Küng
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sf0x.cpp: change baudrate to 115200 for SF11/C
parent
7a5aaa33
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/sf0x/sf0x.cpp
+13
-1
13 additions, 1 deletion
src/drivers/distance_sensor/sf0x/sf0x.cpp
with
13 additions
and
1 deletion
src/drivers/distance_sensor/sf0x/sf0x.cpp
+
13
−
1
View file @
d2a0c857
...
...
@@ -590,7 +590,19 @@ SF0X::cycle()
/* no parity, one stop bit */
uart_config
.
c_cflag
&=
~
(
CSTOPB
|
PARENB
);
unsigned
speed
=
B9600
;
/* if distance sensor model is SF11/C, then set baudrate 115200, else 9600 */
int
hw_model
;
param_get
(
param_find
(
"SENS_EN_SF0X"
),
&
hw_model
);
unsigned
speed
;
if
(
hw_model
==
5
)
{
speed
=
B115200
;
}
else
{
speed
=
B9600
;
}
/* set baud rate */
if
((
termios_state
=
cfsetispeed
(
&
uart_config
,
speed
))
<
0
)
{
...
...
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