115 [[nodiscard]] QString
dataFormat()
const override {
return u
"FLARM/NMEA"_s; }
124 [[nodiscard]] QString
icon()
const override {
return u
"/icons/material/ic_bluetooth.svg"_s; }
162 void onCharacteristicChanged(
const QLowEnergyCharacteristic &characteristic,
const QByteArray &newValue);
165 void onDeviceDiscovered(
const QBluetoothDeviceInfo &info);
166 void onDiscoveryFinished();
169 void onControlerError(QLowEnergyController::Error error);
171 void onServiceDiscoveryFinished();
172 void onDiscoveryError(QBluetoothDeviceDiscoveryAgent::Error error);
174 void onServiceStateChanged(QLowEnergyService::ServiceState newState);
176 void onStateChanged(QLowEnergyController::ControllerState state);
182 QBluetoothPermission m_bluetoothPermission;
185 QBluetoothDeviceInfo m_info;
188 QBluetoothDeviceDiscoveryAgent* m_discoveryAgent =
nullptr;
191 void setupController(
const QBluetoothDeviceInfo &info);
194 void cleanupServices();
195 QLowEnergyController* m_control =
nullptr;
197 QLowEnergyService* m_nordicUARTService =
nullptr;
198 QBluetoothUuid
const nordicUARTServiceUuid {
"6e400001-b5a3-f393-e0a9-e50e24dcca9e"};
199 QBluetoothUuid
const nordicUARTTxCharacteristicID {
"6e400003-b5a3-f393-e0a9-e50e24dcca9e"};
201 QLowEnergyService* m_simpleUARTService =
nullptr;
202 QBluetoothUuid
const simpleUARTServiceUuid {
"0000ffe0-0000-1000-8000-00805f9b34fb"};
203 QBluetoothUuid
const simpleUARTCharacteristicID {
"0000ffe1-0000-1000-8000-00805f9b34fb"};