projects
/
the_perfect_clock.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bad logic
[the_perfect_clock.git]
/
the_perfect_clock.ino
diff --git
a/the_perfect_clock.ino
b/the_perfect_clock.ino
index 2ca7d1f0c5be1ede9bbf0c9c022d0747742e0e04..917f5688e69da72cf5f82c19c7e853b5a8717422 100644
(file)
--- a/
the_perfect_clock.ino
+++ b/
the_perfect_clock.ino
@@
-313,7
+313,7
@@
void calibrate()
static unsigned long last_calib = -86398000;
unsigned long m = millis();
unsigned long mm = m - last_calib;
static unsigned long last_calib = -86398000;
unsigned long m = millis();
unsigned long mm = m - last_calib;
- if (
50000 < mm < 70000
) {
+ if (
(50000 < mm) && (mm < 70000)
) {
millis_per_minute = mm;
}
last_calib = m;
millis_per_minute = mm;
}
last_calib = m;