| | |
| | | #include "../jni_log.h" |
| | | #include "../common/apptimer.h" |
| | | |
| | | #define DEBUG(fmt, args...) LOGD("<car_start> <%s>: " fmt, __func__, ##args) |
| | | #define DEBUG(fmt, args...) LOGD("<road_exam car_start> <%s>: " fmt, __func__, ##args) |
| | | |
| | | static const int MAX_ENGINE_RPM = 2500; |
| | | static const double START_CAR_MOVE_DISTANCE = 10.0; |
| | |
| | | checkStartCarSignal = false; |
| | | checkDoor = false; |
| | | handBreakActive = false; |
| | | int id = PlayTTS("请起步", cb); |
| | | PlayTTS("请起步", cb); |
| | | |
| | | DEBUG("语音开始 %d", id); |
| | | DEBUG("车辆起步"); |
| | | } |
| | | |
| | | bool TestCarStart(const car_model *car, double speed, int moveDirect, const struct RtkTime *rtkTime) |
| | |
| | | car_sensor_value_t sensor; |
| | | double moveDistance = ReadOdo() - startCarMoveDistance; |
| | | |
| | | DEBUG("起步行驶距离 %f", moveDistance); |
| | | // DEBUG("起步行驶距离 %f", moveDistance); |
| | | |
| | | if (!checkStartCarSignal && moveDirect == 1) { |
| | | checkStartCarSignal = true; |
| | |
| | | DEBUG("变调未打灯!!"); |
| | | // 没打灯,不合格 |
| | | AddExamFault(13, rtkTime); |
| | | } else if (TimeGetDiff(rtkTime, &sensor.time) >= D_SEC(3)) { |
| | | } else if (TimeGetDiff(rtkTime, &sensor.time) < D_SEC(3)) { |
| | | DEBUG("转向灯时间不足"); |
| | | // 不足3秒,不合格 |
| | | AddExamFault(14, rtkTime); |