[FL1327] Fix duplicate MOTD #475

This commit is contained in:
あく 2021-05-19 19:53:11 +03:00 committed by GitHub
parent a9083561fa
commit f69fa4b98f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,11 +46,15 @@ void _api_hal_vcp_control_line(uint8_t state) {
bool rts = state & 0b10;
if (rts) {
if (!api_hal_vcp->alive) {
api_hal_vcp->alive = true;
_api_hal_vcp_rx_callback(&ascii_soh, 1); // SOH
}
} else {
api_hal_vcp->alive = false;
if (api_hal_vcp->alive) {
_api_hal_vcp_rx_callback(&ascii_eot, 1); // EOT
api_hal_vcp->alive = false;
}
}
osSemaphoreRelease(api_hal_vcp->tx_semaphore);