Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stechuhr-client
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pandemic_Response
stechuhr-client
Commits
92a8fad2
Commit
92a8fad2
authored
4 years ago
by
David Huss
Browse files
Options
Downloads
Patches
Plain Diff
Add startup signaling for LED
parent
07ed2e31
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
stechuhr_client/client.py
+8
-1
8 additions, 1 deletion
stechuhr_client/client.py
with
8 additions
and
1 deletion
stechuhr_client/client.py
+
8
−
1
View file @
92a8fad2
...
...
@@ -128,6 +128,13 @@ def set_led(ledstate, config):
time
.
sleep
(
repeat
(
config
[
"
led
"
][
"
failure_on_time
"
],
i
))
LEDS
.
fill
((
0
,
0
,
0
))
time
.
sleep
(
repeat
(
config
[
"
led
"
][
"
failure_off_time
"
],
i
))
elif
ledstate
in
[
"
startup
"
]:
# Display the fitting LED color for the state at the given repetition
for
i
in
range
(
4
):
LEDS
.
fill
((
255
,
255
,
255
))
time
.
sleep
(
0.2
)
LEDS
.
fill
((
0
,
0
,
0
))
time
.
sleep
(
0.1
)
# Return to default standby LED color in the end
LEDS
.
fill
(
config
[
"
led
"
][
"
standby_color
"
][
0
])
...
...
@@ -322,7 +329,7 @@ def main():
outputThread
.
start
()
# Set the LED to display readyness
dispatch_led
(
"
default
"
,
config
)
dispatch_led
(
"
startup
"
,
config
)
# On the main thread handle communications between the two other threads. That means:
# If there is sth. on the input queue, put it onto the output queue if it fits the
...
...
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