fix speed log staying 0
This commit is contained in:
parent
dc3b7d6ff5
commit
b96c3bcc19
|
@ -295,7 +295,7 @@ void loop() {
|
|||
|
||||
if (newData2 || newData3) { //when new data arrived from one controller
|
||||
float _meanRPM=FeedbackFront.speedL_meas-FeedbackFront.speedR_meas+FeedbackRear.speedL_meas-FeedbackRear.speedR_meas;
|
||||
float meanSpeedms=_meanRPM*wheelcircumference/60.0; // Units: 1/min * m / 60s
|
||||
meanSpeedms=_meanRPM*wheelcircumference/60.0; // Units: 1/min * m / 60s
|
||||
trip+=abs(meanSpeedms)* (millis()-last_feedback) / 1000.0;
|
||||
last_feedback=millis();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue