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
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
card10
firmware
Commits
e2dbfe81
Commit
e2dbfe81
authored
5 years ago
by
markus
Browse files
Options
Downloads
Patches
Plain Diff
Model localtime as parameter to update function
parent
ad560d6c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
preload/main.py
+3
-3
3 additions, 3 deletions
preload/main.py
with
3 additions
and
3 deletions
preload/main.py
+
3
−
3
View file @
e2dbfe81
...
...
@@ -159,7 +159,8 @@ class Clock:
try
:
with
display
.
open
()
as
disp
:
while
True
:
self
.
updateClock
(
disp
)
localtime
=
utime
.
localtime
()
self
.
updateClock
(
disp
,
localtime
)
if
self
.
run_once
:
break
...
...
@@ -181,9 +182,8 @@ class Clock:
leds
.
set
(
i
,
(
0
,
0
,
0
))
return
def
updateClock
(
self
,
disp
):
def
updateClock
(
self
,
disp
,
localtime
):
disp
.
clear
(
self
.
background_col
)
localtime
=
utime
.
localtime
()
disp
.
pixel
(
self
.
center
[
0
]
+
self
.
offsetx
,
self
.
center
[
1
],
col
=
self
.
center_col
)
hour_coords
=
self
.
circlePoint
(
...
...
This diff is collapsed.
Click to expand it.
markus
@markus
mentioned in commit
1dec8387
·
5 years ago
mentioned in commit
1dec8387
mentioned in commit 1dec83870e11657bb9000885aaff6aa3bfca1960
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