-
OD 2>> 123.456 km
+
OD 2>> 123.456 Km
DIRECT
TDiff:
00:00:00
diff --git a/src/index.h b/src/index.h
index 5d8fb09..34fa3d8 100644
--- a/src/index.h
+++ b/src/index.h
@@ -64,7 +64,7 @@ const char HTML_startrally[] PROGMEM = R"rawliteral(
ws.close();
};
ws.onmessage = function(event) {
- // console.log(event.data);
+ console.log(event.data);
if(event.data && IsJsonString(event.data)){
let data = JSON.parse(event.data);
// if (data.hasOwnProperty("ping")) {
diff --git a/src/main.cpp b/src/main.cpp
index 777cfbc..c4a08db 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1597,9 +1597,9 @@ void redrawcalibrationMenu()
// }
}
// Declaration for calculationRally Variable
- char gcur_speed_str[7];
- char gcur_distance1_str[7];
- char gcur_distance2_str[7];
+ char gcur_speed_str[8];
+ char gcur_distance1_str[8];
+ char gcur_distance2_str[8];
char gcur_time1_str[12];
char gcur_time2_str[12];
String gcurTime;
@@ -1621,7 +1621,8 @@ void redrawcalibrationMenuForESP32()
getCalib["counter2"]=VSSCount; /////
getCalib["counter"]=String(gVSSCountDiff);
getCalib["curTrip"]=String(Trip[curTrip].sub); /////
- getCalib["curTripSpeed"]=String(Trip[curTrip].speed); /////
+ // getCalib["curTripSpeed"]=String(Trip[curTrip].speed); /////
+ getCalib["curTripSpeed"]=gcur_speed_str; /////gcur_speed_str
// String curTime = runningtimeforESP32(6,0);
gcurTime = runningtimeforESP32(6,0);
getCalib["curTime"]=gcurTime;
@@ -1651,7 +1652,9 @@ void fillSetTimeJsonForESP32()
docSetTime["counter2"]=VSSCount; /////
docSetTime["counter"]=String(gVSSCountDiff);
docSetTime["curTrip"]=String(Trip[curTrip].sub); /////
- docSetTime["curTripSpeed"]=String(Trip[curTrip].speed); /////
+ // docSetTime["curTripSpeed"]=String(Trip[curTrip].speed); /////
+ docSetTime["curTripSpeed"]=gcur_speed_str; /////
+
// DS3231_get(&t);
struct tm NTPTimeInfo;
String NTPTime;
@@ -2155,7 +2158,7 @@ void calculationRally() //calculation only ESP32
startsavemillis=millis()+2500;
}
// Serial.print(Trip[curTrip].sub);Serial.print(Trip[curTrip].speed);Serial.print(";");Serial.println(Trip[curTrip].startHour);
- delay(1);
+ // delay(1);
gcurTime = runningtimeforESP32(6,0);
sprintf(gcur_speed_str, "%3.01f", speed1);
@@ -2176,6 +2179,7 @@ void calculationRally() //calculation only ESP32
sprintf(gcur_distance1_str, "%04.01f", distance1);
}
// Serial.print(distance2);Serial.print(";");Serial.println(count2);
+Serial.print(gcurTime);Serial.print(";");Serial.println(t.hour);
if (distance2<0) {
sprintf(gcur_distance2_str, "%02.02f", distance2);
@@ -2238,7 +2242,7 @@ void calculationRally() //calculation only ESP32
if (hours1<10) sprintf(gcur_time1_str, " %s%01d:%02d:%02d", (negatifsign?"-":" "), hours1, mins1, secs1);
else sprintf(gcur_time1_str, "%s%02d:%02d:%02d", (negatifsign?"-":" "), hours1, mins1, secs1);
}
-delay(1);
+// delay(1);
// Print Second TIME
int secs2, mins2, hours2;
@@ -2259,7 +2263,7 @@ delay(1);
tottime2 = totcurrentsecs - tottime2 ;
}
}
-delay(1);
+// delay(1);
hours2 = ((int)(tottime2 / 3600))%24;
mins2 = (int)((tottime2 % 3600)/60);
secs2 = (tottime2 % 60);
@@ -2271,6 +2275,7 @@ delay(1);
if (hours2<10) sprintf(gcur_time2_str, " %s%01d:%02d:%02d", (negatifsign?"-":" "), hours2, mins2, secs2);
else sprintf(gcur_time2_str, "%s%02d:%02d:%02d", (negatifsign?"-":" "), hours2, mins2, secs2);
}
+ Serial.print(gcurTime);Serial.print(t.min);Serial.println(t.sec);
// Serial.println("ENDCRal");
} ///// calculation only for esp32