diff --git a/.gitignore b/.gitignore index 213b68e..8b1112e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ GD32F103C8T6/App/Output/* GD32F103C8T6/Bootloader/Output/* GD32F103C8T6/._GD32F10x.emProject *.emSession -*.jlink \ No newline at end of file +*.jlink +._* \ No newline at end of file diff --git a/GD32F103C8T6/App/User/Peripheral/V58/v58.c b/GD32F103C8T6/App/User/Peripheral/V58/v58.c index a002b8c..1a4753d 100644 --- a/GD32F103C8T6/App/User/Peripheral/V58/v58.c +++ b/GD32F103C8T6/App/User/Peripheral/V58/v58.c @@ -85,6 +85,8 @@ void v58_volume_down(void) */ void v58_stop(void) { + delay_ms(100); + /* 停止 */ v58_send_pulse(1); diff --git a/GD32F103C8T6/App/User/app.c b/GD32F103C8T6/App/User/app.c index 57460a4..494095b 100644 --- a/GD32F103C8T6/App/User/app.c +++ b/GD32F103C8T6/App/User/app.c @@ -548,7 +548,19 @@ static void vehicle_status_parsing_task(uint8_t uuid) { status = 0x00; status_type = 5; + + door_status = 0x01; + turn_left_status = 0x01; + turn_right_status = 0x01; + + diaodu_status = diaodu_status_temporry; + + goto EXECUTE; } + + diaodu_status = diaodu_status_temporry; + + return; } /* 到站 */ else if (diaodu_status_temporry == 1) @@ -558,30 +570,27 @@ static void vehicle_status_parsing_task(uint8_t uuid) /* 优先级最高,关闭语音 */ v58_stop(); + + door_status = 0x01; + turn_left_status = 0x01; + turn_right_status = 0x01; + + diaodu_status = diaodu_status_temporry; + + goto EXECUTE; } - diaodu_status = diaodu_status_temporry; - - door_status = 0xFF; - turn_left_status = 0x01; - turn_right_status = 0x01; - - goto EXECUTE; } } /* 如果一直处于进站状态, 超过 2 分钟, 则取消该状态, 并停止语音 */ if (diaodu_status == 1) { + /* 修改为出站状态 */ if (diaodu_status_rx_timestamp != 0 && timestamp - diaodu_status_rx_timestamp >= 120000) - { - /* 修改为出站状态 */ diaodu_arrival_or_departure_parsing(0x02); - goto EXECUTE; - } - return; } @@ -924,8 +933,7 @@ void api_notify_data_forwarding(uint8_t type, uint8_t value) break; case 0x05: - diaodu_upload_status = 0x01; - diaodu_status_temporry = value; + diaodu_arrival_or_departure_parsing(value); break; case 0x06: