Skip to content
GitLab
Explore
Sign in
Register
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
zenox
firmware
Commits
f77585c8
Commit
f77585c8
authored
5 years ago
by
zenox
Browse files
Options
Downloads
Patches
Plain Diff
blink_rocket: working with just one rocket
parent
7c16c31f
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
epicardium/modules/leds.c
+7
-7
7 additions, 7 deletions
epicardium/modules/leds.c
with
7 additions
and
7 deletions
epicardium/modules/leds.c
+
7
−
7
View file @
f77585c8
...
...
@@ -146,29 +146,29 @@ int epic_leds_get_rocket(int led)
return
ret
;
}
static
TimerHandle_t
blink_timer
[
NUM_ROCKETS
]
;
static
TimerHandle_t
blink_timer
=
NULL
;
void
bTimerCallback
(
TimerHandle_t
blink_timer
)
{
uint32_t
id
=
(
uint32_t
)
pvTimerGetTimerID
(
blink_timer
);
epic_leds_set_rocket
(
id
,
0
);
epic_leds_set_rocket
(
0
,
0
);
}
void
epic_leds_blink_rocket
(
int
led
,
uint8_t
value
,
int
millis
)
{
int
ticks
=
millis
*
(
configTICK_RATE_HZ
/
1000
);
int32_t
id
=
led
;
if
(
blink_timer
[
id
]
==
NULL
)
{
blink_timer
[
id
]
=
xTimerCreate
(
if
(
blink_timer
==
NULL
)
{
blink_timer
=
xTimerCreate
(
"blinktimer"
,
ticks
,
pdFALSE
,
(
void
*
)
id
,
0
,
bTimerCallback
);
}
else
{
epic_leds_set_rocket
(
led
,
value
);
xTimerChangePeriod
(
blink_timer
[
id
]
,
ticks
,
0
);
epic_leds_set_rocket
(
0
,
value
);
xTimerChangePeriod
(
blink_timer
,
ticks
,
0
);
}
}
void
epic_set_flashlight
(
bool
power
)
...
...
This diff is collapsed.
Click to expand it.
zenox
@zenox
mentioned in issue
card10/firmware#176
·
5 years ago
mentioned in issue
card10/firmware#176
mentioned in issue card10/firmware#176
Toggle commit list
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