~aleteoryx/muditaos

488aedcf7f8b14cfacc32d6de18500d20318ea07 — Pawel Olejniczak 4 years ago 5bff92e
[CP-264] Ensure bluetooth logging

Add missing logs with required information:
Pairing result and disconnecting bt device.
1 files changed, 7 insertions(+), 3 deletions(-)

M module-bluetooth/Bluetooth/CommandHandler.cpp
M module-bluetooth/Bluetooth/CommandHandler.cpp => module-bluetooth/Bluetooth/CommandHandler.cpp +7 -3
@@ 132,14 132,16 @@ namespace bluetooth

    Error::Code CommandHandler::disconnectAudioConnection()
    {
        LOG_INFO("Disconnecting audio");
        profileManager->disconnect();
        return Error::Success;
    }
    Error::Code CommandHandler::pair(bd_addr_t addr)
    {
        LOG_INFO("Pairing...");

        return driver->pair(addr) ? Error::Success : Error::LibraryError;
        const auto error_code = driver->pair(addr) ? Error::Success : Error::LibraryError;
        LOG_INFO("Pairing result: %s", magic_enum::enum_name(error_code).data());
        return error_code;
    }
    Error::Code CommandHandler::switchAudioProfile()
    {


@@ 161,7 163,9 @@ namespace bluetooth
        if (profileManager->isAddressActuallyUsed(addr)) {
            profileManager->disconnect();
        }
        return driver->unpair(addr) ? Error::Success : Error::LibraryError;
        const auto error_code = driver->unpair(addr) ? Error::Success : Error::LibraryError;
        LOG_INFO("Unpairing result: %s", magic_enum::enum_name(error_code).data());
        return error_code;
    }

    Error::Code CommandHandler::availableDevices()