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
2ec5ea48
Commit
2ec5ea48
authored
7 years ago
by
Martina
Committed by
Daniel Agar
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tunes: for custom tunes set silence from tune control message and set
silence to 0 when the end of the string is reached
parent
9611641b
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/lib/tunes/tunes.cpp
+3
-1
3 additions, 1 deletion
src/lib/tunes/tunes.cpp
with
3 additions
and
1 deletion
src/lib/tunes/tunes.cpp
+
3
−
1
View file @
2ec5ea48
...
...
@@ -94,6 +94,7 @@ int Tunes::set_control(const tune_control_s &tune_control)
case
tune_control_s
::
TUNE_ID_CUSTOM
:
_frequency
=
(
unsigned
)
tune_control
.
frequency
;
_duration
=
(
unsigned
)
tune_control
.
duration
;
_silence
=
(
unsigned
)
tune_control
.
silence
;
_using_custom_msg
=
true
;
break
;
...
...
@@ -151,7 +152,7 @@ int Tunes::get_next_tune(unsigned &frequency, unsigned &duration, unsigned &sile
_using_custom_msg
=
false
;
frequency
=
_frequency
;
duration
=
_duration
;
silence
=
0
;
silence
=
_silence
;
return
TUNE_STOP
;
}
...
...
@@ -169,6 +170,7 @@ int Tunes::get_next_tune(unsigned &frequency, unsigned &duration, unsigned &sile
int
c
=
next_char
();
if
(
c
==
0
)
{
silence
=
0
;
goto
tune_end
;
}
...
...
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