| | |
| | | #include "../jni_log.h" |
| | | #include "../utils/xconvert.h" |
| | | #include "../defs.h" |
| | | #include "../test_common/car_sensor.h" |
| | | |
| | | #include <vector> |
| | | #include <cstdlib> |
| | |
| | | |
| | | if (az >= 30) { |
| | | if (!turnLeftFinished) { |
| | | char turn_direct; |
| | | if((( ((int)heading) + 360 - enterAreaHeading) % 360) < 180) { |
| | | DEBUG("右转"); |
| | | turn_direct = 'R'; |
| | | } else { |
| | | DEBUG("左转"); |
| | | turn_direct = 'L'; |
| | | } |
| | | // 转向灯未开启,扣10分 |
| | | AddExamFault(30, rtkTime); |
| | | DEBUG("转向灯未开启"); |
| | | if ((turn_direct == 'R' && ReadCarStatus(TURN_SIGNAL_LAMP) != RIGHT_TURN_LIGHT) || |
| | | (turn_direct == 'L' && ReadCarStatus(TURN_SIGNAL_LAMP) != LEFT_TURN_LIGHT)) { |
| | | DEBUG("转向灯未开启"); |
| | | AddExamFault(30, rtkTime); |
| | | } |
| | | } |
| | | turnLeftFinished = true; |
| | | } |