Permalink
Browse files

Bugfixes

  • Loading branch information...
1 parent c1ff642 commit aa7255d447699cd43a063798c62b775073e860f0 @reefab committed Nov 9, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −8 Bike/Bike.ino
  2. +0 −1 Bike/ntp.h
View
@@ -122,13 +122,11 @@ void setup() {
setStartTime();
delay(1000);
// Retry if unable to get time from NTP
- if (year() == 1970) {
- while(year() == 1970){
- delay(10000);
- lcd.clear();
- lcd.print("Retrying ...");
- setStartTime();
- }
+ while(year() == 1970 or getTimeString().length() <= 10){
+ delay(50000);
+ lcd.clear();
+ lcd.print("Retrying ...");
+ setStartTime();
}
// Upload saved session if present
if (savePresent()) {
@@ -172,6 +170,7 @@ void reset(boolean startNew=false)
startTimeStr = getTimeString();
start = false;
}
+ paused = false;
}
void loop() {
@@ -203,7 +202,6 @@ void loop() {
if (start) {
lcd.setCursor(0, 0);
lcd.print("Activity started");
- delay(5000);
}
delay(250);
reset(start);
View
@@ -53,7 +53,6 @@ unsigned long getTimeStamp() {
}
}
-
String prettyDigits(int digits){
// utility function for digital clock display: prints preceding colon and leading 0
String output = ":";

0 comments on commit aa7255d

Please sign in to comment.