Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
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
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Boardcore
Commits
d47ef316
Commit
d47ef316
authored
3 years ago
by
Alberto Nidasio
Browse files
Options
Downloads
Patches
Plain Diff
[Buzzer] Fixed spelling error
parent
f66110ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/actuators/Buzzer.h
+5
-5
5 additions, 5 deletions
src/shared/actuators/Buzzer.h
with
5 additions
and
5 deletions
src/shared/actuators/Buzzer.h
+
5
−
5
View file @
d47ef316
...
@@ -29,7 +29,7 @@ namespace Boardcore
...
@@ -29,7 +29,7 @@ namespace Boardcore
{
{
/**
/**
* @brief This driver does not provide a square wave signal but insted is a
* @brief This driver does not provide a square wave signal but inste
a
d is a
* simple utility that provides long PWM signals to make the buzzer beep
* simple utility that provides long PWM signals to make the buzzer beep
* on and off.
* on and off.
*/
*/
...
@@ -73,7 +73,7 @@ public:
...
@@ -73,7 +73,7 @@ public:
* @param onTime Buzzer on time [ms].
* @param onTime Buzzer on time [ms].
* @param offTime Buzzer off time [ms].
* @param offTime Buzzer off time [ms].
*/
*/
void
continuoslyToggle
(
uint16_t
onTime
,
uint16_t
offTime
);
void
continuo
u
slyToggle
(
uint16_t
onTime
,
uint16_t
offTime
);
private:
private:
GP16bitTimer
timer
;
GP16bitTimer
timer
;
...
@@ -116,7 +116,7 @@ inline void Buzzer::oneTimeToggle(uint16_t ms)
...
@@ -116,7 +116,7 @@ inline void Buzzer::oneTimeToggle(uint16_t ms)
timer
.
setPrescaler
(
timer
.
setPrescaler
(
TimerUtils
::
computePrescalerValue
(
timer
.
getTimer
(),
10000
));
TimerUtils
::
computePrescalerValue
(
timer
.
getTimer
(),
10000
));
// Make the timer reload after the specified amount of millis
s
econds
// Make the timer reload after the specified amount of milliseconds
timer
.
setAutoReloadRegister
(
ms
*
10
);
timer
.
setAutoReloadRegister
(
ms
*
10
);
timer
.
setCaptureCompareRegister
(
channel
,
1
);
timer
.
setCaptureCompareRegister
(
channel
,
1
);
...
@@ -134,7 +134,7 @@ inline void Buzzer::oneTimeToggle(uint16_t ms)
...
@@ -134,7 +134,7 @@ inline void Buzzer::oneTimeToggle(uint16_t ms)
timer
.
enable
();
timer
.
enable
();
}
}
inline
void
Buzzer
::
continuoslyToggle
(
uint16_t
onTime
,
uint16_t
offTime
)
inline
void
Buzzer
::
continuo
u
slyToggle
(
uint16_t
onTime
,
uint16_t
offTime
)
{
{
if
(
onTime
==
0
||
offTime
==
0
)
if
(
onTime
==
0
||
offTime
==
0
)
return
;
return
;
...
@@ -146,7 +146,7 @@ inline void Buzzer::continuoslyToggle(uint16_t onTime, uint16_t offTime)
...
@@ -146,7 +146,7 @@ inline void Buzzer::continuoslyToggle(uint16_t onTime, uint16_t offTime)
timer
.
setPrescaler
(
timer
.
setPrescaler
(
TimerUtils
::
computePrescalerValue
(
timer
.
getTimer
(),
10000
));
TimerUtils
::
computePrescalerValue
(
timer
.
getTimer
(),
10000
));
// Make the timer reload after the specified amount of millis
s
econds
// Make the timer reload after the specified amount of milliseconds
timer
.
setAutoReloadRegister
((
onTime
+
offTime
)
*
10
);
timer
.
setAutoReloadRegister
((
onTime
+
offTime
)
*
10
);
timer
.
setCaptureCompareRegister
(
channel
,
onTime
*
10
);
timer
.
setCaptureCompareRegister
(
channel
,
onTime
*
10
);
...
...
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