Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bugfixes

  • Loading branch information...
commit aa7255d447699cd43a063798c62b775073e860f0 1 parent c1ff642
@reefab authored
Showing with 6 additions and 9 deletions.
  1. +6 −8 Bike/Bike.ino
  2. +0 −1  Bike/ntp.h
View
14 Bike/Bike.ino
@@ -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
1  Bike/ntp.h
@@ -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 = ":";
Please sign in to comment.
Something went wrong with that request. Please try again.