Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EMM
meteorolog
Commits
fc4b6332
Commit
fc4b6332
authored
Jul 06, 2015
by
Nelso Jost
Browse files
FIX: rtc detection removed
parent
54640d6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
fc4b6332
...
...
@@ -107,7 +107,7 @@ bu: ${USE}-install
bus
:
bu serial
sync-rtc
:
${VENV}
/bin/python
${PYVER}
run.py
--syncrtc
${VENV}
/bin/python
${PYVER}
logger/
run.py
--syncrtc
run
:
${VENV}
/bin/python logger/run.py
...
...
logger/app/main.py
View file @
fc4b6332
...
...
@@ -282,10 +282,10 @@ class Meteorologger:
def
sync_rtc
(
self
,
port_index
=
None
):
if
isinstance
(
port_index
,
int
):
serial_port
=
self
.
CFG
[
'ARDUINO'
][
'SERIAL_PORT'
][
port_index
]
else
:
serial_port
=
self
.
SERIAL_PORTS
[
0
]
if
not
isinstance
(
port_index
,
int
):
port_index
=
0
serial_port
=
self
.
CFG
[
'ARDUINO'
][
'SERIAL_PORTS'
][
port_index
]
# if present, the board will be reseted
ser
=
serial
.
Serial
(
serial_port
,
self
.
CFG
[
'ARDUINO'
][
'BAUD_RATE'
],
...
...
meteorolog/mysensors.cpp
View file @
fc4b6332
...
...
@@ -60,6 +60,8 @@ RTC_DS1307 rtc;
String
read_RTC_DS1307
()
{
return
get_datetime_str
(
rtc
.
now
());
if
(
rtc
.
isrunning
())
{
return
get_datetime_str
(
rtc
.
now
());
...
...
@@ -92,10 +94,11 @@ String get_datetime_str(DateTime dt)
// Expects something like "2015,6,28,13,13,10"
String
set_time_from_csv
(
String
s
)
{
/*
if (!rtc.isrunning())
{
return String("<RTC_DS1307_not_found>");
}
}
*/
DateTime
dt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment