| | |
| | | AppTimer_delete(CheckSolution); |
| | | } |
| | | |
| | | // 记录中间过程 |
| | | void handleLigthExam(uint16_t id, int value) |
| | | { |
| | | if (testing) { |
| | |
| | | } |
| | | } |
| | | |
| | | // 检查最终状态 |
| | | static void CheckSolution(union sigval sig) |
| | | { |
| | | int question = sig.sival_int; |
| | | |
| | | AppTimer_delete(CheckSolution); |
| | | |
| | | if (content[question].process.size() > 0) { |
| | |
| | | } |
| | | |
| | | for (int i = 0; i < content[question].solution.size(); ++i) { |
| | | if (ReadCarStatus((content[question].solution[i]>>8)&0xFF) != content[question].solution[i] & 0xFF) { |
| | | if (ReadCarStatus((content[question].solution[i]>>8)&0xFF) != (content[question].solution[i] & 0xFF)) { |
| | | AddExamFault(content[question].wrongCode, &currRtkTime); |
| | | break; |
| | | } |
| | |
| | | static void ExamDummyLight(void) |
| | | { |
| | | if (testing && question < contentNum) { |
| | | DEBUG("灯光题目: %s", content[question].tts.c_str()); |
| | | PlayTTS(content[question].tts, DummyLightTTSDone); |
| | | } else { |
| | | testing = false; |