| | |
| | | static int contentNum; |
| | | static int currContent; |
| | | |
| | | static void DummyLightCheckLight(union sigval sig); |
| | | static void ExamDummyLight(union sigval sig); |
| | | |
| | | void StartDummyLightExam(struct dummy_light_exam *ptr, int num) |
| | | { |
| | | DEBUG("StartDummyLightExam"); |
| | | content = ptr; |
| | | contentNum = num; |
| | | currContent = 0; |
| | | |
| | | AppTimer_delete(DummyLightCheckLight); |
| | | AppTimer_delete(ExamDummyLight); |
| | | AppTimer_add(ExamDummyLight, D_SEC(2)); |
| | | } |
| | | |
| | | void DummyLightTTSDone(int id) |
| | | { |
| | | DEBUG("DummyLightTTSDone %d", id); |
| | | |
| | | if (id == 100) { |
| | | AppTimer_add(DummyLightCheckLight, D_SEC(3), id); |
| | | } else if (id == 101) { |
| | | AppTimer_add(DummyLightCheckLight, D_SEC(1), id); |
| | | } else { |
| | | AppTimer_add(DummyLightCheckLight, D_SEC(5), id); |
| | | } |
| | | } |
| | | |
| | | static void DummyLightCheckLight(union sigval sig) |
| | | { |
| | | AppTimer_delete(DummyLightCheckLight); |
| | | |
| | | DEBUG("DummyLightCheckLight %d", sig.sival_int); |
| | | } |
| | | |
| | | static void ExamDummyLight(union sigval sig) |
| | |
| | | if (currContent < contentNum) { |
| | | DEBUG("模拟灯光测试 %s", content[currContent].tts); |
| | | |
| | | PlayTTS(content[currContent].tts); |
| | | PlayTTS(content[currContent].tts, content[currContent].item); |
| | | currContent++; |
| | | AppTimer_add(ExamDummyLight, D_SEC(5)); |
| | | } |