mirror of
https://github.com/Crocmagnon/plant-badger.git
synced 2024-11-22 09:28:03 +01:00
Improve set_clocks
This commit is contained in:
parent
76818e674b
commit
f6fe6b1fc2
1 changed files with 2 additions and 11 deletions
|
@ -185,14 +185,5 @@ class Badger2040W:
|
|||
|
||||
def set_clocks(self):
|
||||
ntptime.settime()
|
||||
(
|
||||
year,
|
||||
month,
|
||||
day,
|
||||
weekday,
|
||||
hours,
|
||||
minutes,
|
||||
seconds,
|
||||
_,
|
||||
) = machine.RTC().datetime()
|
||||
self.rtc.datetime((year, month, day, hours, minutes, seconds, weekday))
|
||||
now = time.localtime()
|
||||
self.rtc.datetime(now[:7])
|
||||
|
|
Loading…
Reference in a new issue