fctom1215
2021-04-28 148254bb1dc170db320bcb208ca79b0e252751d8
lib/src/main/cpp/test_common/odo_graph.cpp
@@ -24,13 +24,13 @@
}
void UpdataOdo(double speed, int moveDirect, const struct RtkTime *rtkTime) {
    // 行驶距离,不包含倒车
    if (odoCnt == 0 && moveDirect == 1) {
    // 行驶距离,含倒车
    if (odoCnt == 0 && moveDirect != 0) {
        odoPrevSpeed = speed;
        odoCnt = 1;
        odoTimer = *rtkTime;
    } else if (odoCnt == 1) {
        if (moveDirect == 1) {
        if (moveDirect != 0) {
            uint32_t tm = TimeGetDiff(rtkTime, &odoTimer);
            if (tm >= D_SEC(1)) {
                odoGraph += ((double) tm) * (odoPrevSpeed + speed) / 2.0 / 1000.0;