console: bluetooth: check if BT port exist before configuring (#4588)

This commit is contained in:
Andrey G 2022-09-18 23:15:50 +03:00 committed by GitHub
parent db57bd0100
commit 9632a3e056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -174,6 +174,11 @@ void bluetoothStart(bluetooth_module_e moduleType, const char *baudRate, const c
tsChannel = getBluetoothChannel();
if (tsChannel == nullptr) {
efiPrintf("No Bluetooth channel configured! Check your board config.");
return;
}
if (btProcessIsStarted) {
efiPrintf("The Bluetooth module init procedure is already started and waiting! To cancel it, run \"bluetooth_cancel\" command!");
return;