From e3f937ab0eaee7ef1a97f361e470f4b7452baea3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 5 Oct 2024 05:34:07 +0000 Subject: [PATCH] Update coverage report for 7d2d077dcecff194c08fa0b1c9144c624b1862e3 --- main/cov/index.html | 8 ++--- .../cov/src/cli/abstractcommand.cpp.gcov.html | 2 +- main/cov/src/cli/abstractcommand.h.gcov.html | 2 +- .../src/cli/calibratecommand.cpp.gcov.html | 2 +- main/cov/src/cli/dsocommand.cpp.gcov.html | 10 +++---- main/cov/src/cli/infocommand.cpp.gcov.html | 4 +-- .../src/cli/loggerfetchcommand.cpp.gcov.html | 4 +-- .../src/cli/loggerstartcommand.cpp.gcov.html | 4 +-- main/cov/src/cli/main.cpp.gcov.html | 24 +++++++-------- main/cov/src/cli/metercommand.cpp.gcov.html | 10 +++---- main/cov/src/cli/scancommand.cpp.gcov.html | 30 +++++++++---------- main/cov/src/cli/setnamecommand.cpp.gcov.html | 2 +- .../cov/src/cli/settorchcommand.cpp.gcov.html | 2 +- main/cov/src/cli/statuscommand.cpp.gcov.html | 14 ++++----- .../lib/abstractpokitservice.cpp.func.html | 4 +-- .../lib/abstractpokitservice.cpp.gcov.html | 18 +++++------ .../lib/abstractpokitservice_p.h.gcov.html | 2 +- main/cov/src/lib/index.html | 10 +++---- main/cov/src/lib/pokitdevice.cpp.gcov.html | 16 +++++----- main/cov/src/lib/pokitdevice_p.h.gcov.html | 2 +- main/cov/src/lib/statusservice.cpp.gcov.html | 6 ++-- 21 files changed, 88 insertions(+), 88 deletions(-) diff --git a/main/cov/index.html b/main/cov/index.html index 5cc98a735..d2a3a0ee7 100644 --- a/main/cov/index.html +++ b/main/cov/index.html @@ -32,7 +32,7 @@ Lines: 80.6 % - 2893 + 2895 2332 @@ -132,10 +132,10 @@ src/lib -
79.6%79.6%
+
79.5%79.5%
- 79.6 % - 1428 + 79.5 % + 1430 1137 86.6 % 276 diff --git a/main/cov/src/cli/abstractcommand.cpp.gcov.html b/main/cov/src/cli/abstractcommand.cpp.gcov.html index 38e8bbe90..09ec22131 100644 --- a/main/cov/src/cli/abstractcommand.cpp.gcov.html +++ b/main/cov/src/cli/abstractcommand.cpp.gcov.html @@ -170,7 +170,7 @@ 82 : */ 83 3240 : QStringList AbstractCommand::supportedOptions(const QCommandLineParser &parser) const 84 : { - 85 25920 : return requiredOptions(parser) + QStringList{ + 85 19840 : return requiredOptions(parser) + QStringList{ 86 : QLatin1String("debug"), 87 : QLatin1String("device"), QLatin1String("d"), 88 : QLatin1String("output"), diff --git a/main/cov/src/cli/abstractcommand.h.gcov.html b/main/cov/src/cli/abstractcommand.h.gcov.html index 44509fbaa..67fcb1677 100644 --- a/main/cov/src/cli/abstractcommand.h.gcov.html +++ b/main/cov/src/cli/abstractcommand.h.gcov.html @@ -129,7 +129,7 @@ 41 : QString deviceToScanFor; ///< Device (if any) that were passed to processOptions(). 42 : PokitDiscoveryAgent * discoveryAgent; ///< Agent for Pokit device descovery. 43 : OutputFormat format { OutputFormat::Text }; ///< Selected output format. - 44 33482 : static Q_LOGGING_CATEGORY(lc, "dokit.cli.command", QtInfoMsg); ///< Logging category for UI commands. + 44 33590 : static Q_LOGGING_CATEGORY(lc, "dokit.cli.command", QtInfoMsg); ///< Logging category for UI commands. 45 : 46 : protected slots: 47 : virtual void deviceDiscovered(const QBluetoothDeviceInfo &info) = 0; diff --git a/main/cov/src/cli/calibratecommand.cpp.gcov.html b/main/cov/src/cli/calibratecommand.cpp.gcov.html index 76c567775..206ed62d8 100644 --- a/main/cov/src/cli/calibratecommand.cpp.gcov.html +++ b/main/cov/src/cli/calibratecommand.cpp.gcov.html @@ -115,7 +115,7 @@ 27 : 28 594 : QStringList CalibrateCommand::requiredOptions(const QCommandLineParser &parser) const 29 : { - 30 2376 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 30 1944 : return DeviceCommand::requiredOptions(parser) + QStringList{ 31 : QLatin1String("temperature"), 32 1512 : }; 33 324 : } diff --git a/main/cov/src/cli/dsocommand.cpp.gcov.html b/main/cov/src/cli/dsocommand.cpp.gcov.html index dd1dd60b4..019bfd68a 100644 --- a/main/cov/src/cli/dsocommand.cpp.gcov.html +++ b/main/cov/src/cli/dsocommand.cpp.gcov.html @@ -114,7 +114,7 @@ 26 : 27 1298 : QStringList DsoCommand::requiredOptions(const QCommandLineParser &parser) const 28 : { - 29 6490 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 29 5192 : return DeviceCommand::requiredOptions(parser) + QStringList{ 30 : QLatin1String("mode"), 31 : QLatin1String("range"), 32 4602 : }; @@ -122,7 +122,7 @@ 34 : 35 638 : QStringList DsoCommand::supportedOptions(const QCommandLineParser &parser) const 36 : { - 37 4466 : return DeviceCommand::supportedOptions(parser) + QStringList{ + 37 3480 : return DeviceCommand::supportedOptions(parser) + QStringList{ 38 : QLatin1String("interval"), 39 : QLatin1String("samples"), 40 : QLatin1String("trigger-level"), @@ -354,12 +354,12 @@ 266 : .arg(sampleNumber).arg(value).arg(unit, range)); 267 2464 : break; 268 2464 : case OutputFormat::Json: - 269 14784 : std::cout << QJsonDocument(QJsonObject{ + 269 11424 : std::cout << QJsonDocument(QJsonObject{ 270 896 : { QLatin1String("value"), value }, 271 896 : { QLatin1String("unit"), unit }, 272 896 : { QLatin1String("range"), range }, 273 4032 : { QLatin1String("mode"), DsoService::toString(metadata.mode) }, - 274 13888 : }).toJson().toStdString(); + 274 17920 : }).toJson().toStdString(); 275 2464 : break; 276 2464 : case OutputFormat::Text: 277 5824 : std::cout << qUtf8Printable(tr("%1 %2 %3\n").arg(sampleNumber).arg(value).arg(unit)); @@ -372,7 +372,7 @@ 284 3168 : nullptr, metadata.numberOfSamples).arg(samplesToGo); 285 1584 : if (device) disconnect(); // Will exit the application once disconnected. 286 : } - 287 13232 : } + 287 11888 : } diff --git a/main/cov/src/cli/infocommand.cpp.gcov.html b/main/cov/src/cli/infocommand.cpp.gcov.html index b09bd3947..e5aa8fff7 100644 --- a/main/cov/src/cli/infocommand.cpp.gcov.html +++ b/main/cov/src/cli/infocommand.cpp.gcov.html @@ -187,7 +187,7 @@ 99 272 : { QLatin1String("hardwareRevision"), service->hardwareRevision() }, 100 272 : { QLatin1String("firmwareRevision"), service->firmwareRevision() }, 101 272 : { QLatin1String("softwareRevision"), service->softwareRevision() }, - 102 1016 : }; + 102 1296 : }; 103 136 : if (!deviceName.isEmpty()) { 104 151 : jsonObject.insert(QLatin1String("deviceName"), deviceName); 105 : } @@ -223,7 +223,7 @@ 135 : break; 136 : } 137 408 : if (device) disconnect(); // Will exit the application once disconnected. - 138 1640 : } + 138 1472 : } diff --git a/main/cov/src/cli/loggerfetchcommand.cpp.gcov.html b/main/cov/src/cli/loggerfetchcommand.cpp.gcov.html index abd69eb2c..9b4f7a565 100644 --- a/main/cov/src/cli/loggerfetchcommand.cpp.gcov.html +++ b/main/cov/src/cli/loggerfetchcommand.cpp.gcov.html @@ -207,7 +207,7 @@ 119 1120 : { QLatin1String("value"), value }, 120 1120 : { QLatin1String("unit"), unit }, 121 5040 : { QLatin1String("mode"), DataLoggerService::toString(metadata.mode) }, - 122 18620 : }; + 122 22820 : }; 123 3080 : if (!range.isEmpty()) { 124 3696 : object.insert(QLatin1String("range"), range); 125 : } @@ -225,7 +225,7 @@ 137 3960 : nullptr, metadata.numberOfSamples).arg(samplesToGo); 138 1980 : if (device) disconnect(); // Will exit the application once disconnected. 139 : } - 140 16540 : } + 140 14860 : } diff --git a/main/cov/src/cli/loggerstartcommand.cpp.gcov.html b/main/cov/src/cli/loggerstartcommand.cpp.gcov.html index 35dbb270a..21f74c517 100644 --- a/main/cov/src/cli/loggerstartcommand.cpp.gcov.html +++ b/main/cov/src/cli/loggerstartcommand.cpp.gcov.html @@ -115,14 +115,14 @@ 27 : 28 990 : QStringList LoggerStartCommand::requiredOptions(const QCommandLineParser &parser) const 29 : { - 30 3960 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 30 3240 : return DeviceCommand::requiredOptions(parser) + QStringList{ 31 : QLatin1String("mode"), 32 2520 : }; 33 540 : } 34 : 35 484 : QStringList LoggerStartCommand::supportedOptions(const QCommandLineParser &parser) const 36 : { - 37 2904 : return DeviceCommand::supportedOptions(parser) + QStringList{ + 37 2288 : return DeviceCommand::supportedOptions(parser) + QStringList{ 38 : QLatin1String("interval"), 39 : QLatin1String("range"), // May still be required by processOptions(), depending on the --mode option's value. 40 : QLatin1String("timestamp"), diff --git a/main/cov/src/cli/main.cpp.gcov.html b/main/cov/src/cli/main.cpp.gcov.html index feb8ea07e..997d94271 100644 --- a/main/cov/src/cli/main.cpp.gcov.html +++ b/main/cov/src/cli/main.cpp.gcov.html @@ -116,7 +116,7 @@ 28 : #include <Windows.h> 29 : #endif 30 : - 31 66 : static Q_LOGGING_CATEGORY(lc, "dokit.cli.main", QtInfoMsg); + 31 72 : static Q_LOGGING_CATEGORY(lc, "dokit.cli.main", QtInfoMsg); 32 : 33 : inline bool haveConsole() 34 : { @@ -217,7 +217,7 @@ 129 22 : Command parseCommandLine(const QStringList &appArguments, QCommandLineParser &parser) 130 : { 131 : // Setup the command line options. - 132 140 : parser.addOptions({ + 132 146 : parser.addOptions({ 133 36 : { QStringLiteral("color"), 134 44 : QCoreApplication::translate("parseCommandLine", "Colors the console output. Valid options " 135 : "are: yes, no and auto. The default is auto."), @@ -225,7 +225,7 @@ 137 22 : {{QStringLiteral("debug")}, 138 44 : QCoreApplication::translate("parseCommandLine", "Enable debug output.")}, 139 8 : {{QStringLiteral("d"), QStringLiteral("device")}, - 140 35 : QCoreApplication::translate("parseCommandLine", + 140 39 : QCoreApplication::translate("parseCommandLine", 141 : "Set the name, hardware address or macOS UUID of Pokit device to use. If not specified, " 142 : "the first discovered Pokit device will be used."), 143 44 : QCoreApplication::translate("parseCommandLine", "device")}, @@ -239,7 +239,7 @@ 151 : "interval. If the option itself is not specified, a sensible default will be chosen " 152 : "according to the selected command."), 153 44 : QCoreApplication::translate("parseCommandLine", "interval")}, - 154 36 : {{QStringLiteral("mode")}, + 154 30 : {{QStringLiteral("mode")}, 155 44 : QCoreApplication::translate("parseCommandLine", "Set the desired operation mode. For " 156 : "meter, dso, and logger commands, the supported modes are: AC Voltage, DC Voltage, AC Current, " 157 : "DC Current, Resistance, Diode, Continuity, and Temperature. All are case insensitive. " @@ -248,10 +248,10 @@ 160 : "requires firmware v1.5 or later for Pokit devices to support it. For the set-torch command " 161 : "supported modes are On and Off."), 162 44 : QCoreApplication::translate("parseCommandLine", "mode")}, - 163 36 : {{QStringLiteral("new-name")}, + 163 30 : {{QStringLiteral("new-name")}, 164 44 : QCoreApplication::translate("parseCommandLine","Give the desired new name for the set-" 165 44 : "name command."), QCoreApplication::translate("parseCommandLine", "name")}, - 166 36 : {{QStringLiteral("output")}, + 166 30 : {{QStringLiteral("output")}, 167 44 : QCoreApplication::translate("parseCommandLine","Set the format for output. Supported " 168 : "formats are: CSV, JSON and Text. All are case insenstitve. The default is Text."), 169 44 : QCoreApplication::translate("parseCommandLine", "format"), @@ -265,23 +265,23 @@ 177 22 : {{QStringLiteral("samples")}, 178 44 : QCoreApplication::translate("parseCommandLine","Set the number of samples to acquire."), 179 44 : QCoreApplication::translate("parseCommandLine", "count")}, - 180 36 : {{QStringLiteral("temperature")}, + 180 30 : {{QStringLiteral("temperature")}, 181 44 : QCoreApplication::translate("parseCommandLine","Set the current ambient temperature for " 182 44 : "the calibration command."), QCoreApplication::translate("parseCommandLine", "degrees")}, - 183 36 : {{QStringLiteral("timeout")}, + 183 30 : {{QStringLiteral("timeout")}, 184 44 : QCoreApplication::translate("parseCommandLine","Set the device discovery scan timeout." 185 : "Suffixes such as 's' and 'ms' (for seconds and milliseconds) may be used. " 186 : "If no suffix is present, the units will be inferred from the magnitide of the given " 187 : "interval. The default behaviour is no timeout."), 188 44 : QCoreApplication::translate("parseCommandLine","period")}, - 189 36 : {{QStringLiteral("timestamp")}, + 189 30 : {{QStringLiteral("timestamp")}, 190 44 : QCoreApplication::translate("parseCommandLine","Set the optional starting timestamp for " 191 : "data logging. Default to 'now'."), 192 44 : QCoreApplication::translate("parseCommandLine","period")}, - 193 36 : {{QStringLiteral("trigger-level")}, + 193 30 : {{QStringLiteral("trigger-level")}, 194 44 : QCoreApplication::translate("parseCommandLine","Set the DSO trigger level."), 195 44 : QCoreApplication::translate("parseCommandLine", "level")}, - 196 36 : {{QStringLiteral("trigger-mode")}, + 196 30 : {{QStringLiteral("trigger-mode")}, 197 44 : QCoreApplication::translate("parseCommandLine","Set the DSO trigger mode. Supported " 198 : "modes are: free, rising and falling. The default is free."), 199 44 : QCoreApplication::translate("parseCommandLine", "mode"), QStringLiteral("free")}, @@ -353,7 +353,7 @@ 265 : // Process the command for real (ie throw errors for unknown options, etc). 266 22 : parser.process(appArguments); 267 0 : return command; - 268 589 : } + 268 513 : } 269 : 270 0 : AbstractCommand * getCommandObject(const Command command, QObject * const parent) 271 : { diff --git a/main/cov/src/cli/metercommand.cpp.gcov.html b/main/cov/src/cli/metercommand.cpp.gcov.html index 0c6316e06..39a9778aa 100644 --- a/main/cov/src/cli/metercommand.cpp.gcov.html +++ b/main/cov/src/cli/metercommand.cpp.gcov.html @@ -114,14 +114,14 @@ 26 : 27 1166 : QStringList MeterCommand::requiredOptions(const QCommandLineParser &parser) const 28 : { - 29 4664 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 29 3816 : return DeviceCommand::requiredOptions(parser) + QStringList{ 30 : QLatin1String("mode"), 31 2968 : }; 32 636 : } 33 : 34 572 : QStringList MeterCommand::supportedOptions(const QCommandLineParser &parser) const 35 : { - 36 3432 : return DeviceCommand::supportedOptions(parser) + QStringList{ + 36 2704 : return DeviceCommand::supportedOptions(parser) + QStringList{ 37 : QLatin1String("interval"), 38 : QLatin1String("range"), 39 : QLatin1String("samples"), @@ -308,7 +308,7 @@ 220 792 : break; 221 264 : case MultimeterService::Mode::Continuity: 222 : status = (reading.status == MultimeterService::MeterStatus::Continuity) - 223 432 : ? tr("Continuity") : tr("No continuity"); + 223 360 : ? tr("Continuity") : tr("No continuity"); 224 264 : break; 225 264 : case MultimeterService::Mode::Temperature: 226 : case MultimeterService::Mode::ExternalTemperature: @@ -350,7 +350,7 @@ 262 550 : { QLatin1String("value"), qIsInf(reading.value) ? 263 600 : QJsonValue(tr("Infinity")) : QJsonValue(reading.value) }, 264 1100 : { QLatin1String("mode"), MultimeterService::toString(reading.mode) }, - 265 2450 : }; + 265 3050 : }; 266 550 : if (!unit.isNull()) { 267 462 : object.insert(QLatin1String("unit"), unit); 268 : } @@ -373,7 +373,7 @@ 285 1650 : if ((samplesToGo > 0) && (--samplesToGo == 0)) { 286 0 : if (device) disconnect(); // Will exit the application once disconnected. 287 : } - 288 4200 : } + 288 3750 : } diff --git a/main/cov/src/cli/scancommand.cpp.gcov.html b/main/cov/src/cli/scancommand.cpp.gcov.html index 3239f953c..eca07fccf 100644 --- a/main/cov/src/cli/scancommand.cpp.gcov.html +++ b/main/cov/src/cli/scancommand.cpp.gcov.html @@ -213,7 +213,7 @@ 125 975 : { QLatin1String("majorDeviceClass"), toJson(info.majorDeviceClass()) }, 126 975 : { QLatin1String("minorDeviceClass"), toJson(info.majorDeviceClass(), info.minorDeviceClass()) }, 127 975 : { QLatin1String("signalStrength"), info.rssi() }, - 128 6255 : }; + 128 7515 : }; 129 695 : if (info.coreConfigurations() != QBluetoothDeviceInfo::UnknownCoreConfiguration) { 130 122 : json.insert(QLatin1String("coreConfiguration"), toJson(info.coreConfigurations())); 131 : } @@ -232,7 +232,7 @@ 144 41 : json.insert(QLatin1String("serviceUuids"), toJson(info.serviceUuids())); 145 : } 146 425 : return json; - 147 6385 : } + 147 5845 : } 148 : 149 : /*! 150 : * Returns \a configuration as a JSON array of strings. @@ -382,7 +382,7 @@ 294 878 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedMiscellaneous); 295 : break; 296 508 : case QBluetoothDeviceInfo::ComputerDevice: - 297 148 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedComputer); + 297 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedComputer); 298 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(DesktopComputer); 299 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ServerComputer); 300 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(LaptopComputer); @@ -391,7 +391,7 @@ 303 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearableComputer); 304 : break; 305 464 : case QBluetoothDeviceInfo::PhoneDevice: - 306 136 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedPhone); + 306 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedPhone); 307 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(CellularPhone); 308 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(CordlessPhone); 309 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(SmartPhone); @@ -403,7 +403,7 @@ 315 : #else 316 270 : case QBluetoothDeviceInfo::NetworkDevice: // Added in Qt 5.13. 317 : #endif - 318 120 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkFullService); + 318 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkFullService); 319 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkLoadFactorOne); 320 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkLoadFactorTwo); 321 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkLoadFactorThree); @@ -413,7 +413,7 @@ 325 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(NetworkNoService); 326 : break; 327 792 : case QBluetoothDeviceInfo::AudioVideoDevice: - 328 228 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedAudioVideoDevice); + 328 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedAudioVideoDevice); 329 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearableHeadsetDevice); 330 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(HandsFreeDevice); 331 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(Microphone); @@ -432,7 +432,7 @@ 344 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(GamingDevice); 345 : break; 346 484 : case QBluetoothDeviceInfo::PeripheralDevice: - 347 144 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedPeripheral); + 347 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedPeripheral); 348 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(KeyboardPeripheral); 349 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(PointingDevicePeripheral); 350 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(KeyboardWithPointingDevicePeripheral); @@ -444,14 +444,14 @@ 356 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(CardReaderPeripheral); 357 : break; 358 264 : case QBluetoothDeviceInfo::ImagingDevice: - 359 84 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedImagingDevice); - 360 72 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageDisplay); - 361 60 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageCamera); - 362 48 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageScanner); - 363 36 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImagePrinter); + 359 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedImagingDevice); + 360 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageDisplay); + 361 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageCamera); + 362 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImageScanner); + 363 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ImagePrinter); 364 : break; 365 308 : case QBluetoothDeviceInfo::WearableDevice: - 366 96 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedWearableDevice); + 366 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedWearableDevice); 367 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearableWristWatch); 368 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearablePager); 369 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearableJacket); @@ -459,7 +459,7 @@ 371 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(WearableGlasses); 372 : break; 373 396 : case QBluetoothDeviceInfo::ToyDevice: - 374 120 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedToy); + 374 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedToy); 375 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ToyRobot); 376 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ToyVehicle); 377 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ToyDoll); @@ -467,7 +467,7 @@ 379 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(ToyGame); 380 : break; 381 396 : case QBluetoothDeviceInfo::HealthDevice: - 382 120 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedHealthDevice); + 382 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(UncategorizedHealthDevice); 383 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(HealthBloodPressureMonitor); 384 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(HealthThermometer); 385 12 : DOKIT_INTERNAL_IF_EQUAL_THEN_RETURN(HealthWeightScale); diff --git a/main/cov/src/cli/setnamecommand.cpp.gcov.html b/main/cov/src/cli/setnamecommand.cpp.gcov.html index 1b2a20874..d947118d6 100644 --- a/main/cov/src/cli/setnamecommand.cpp.gcov.html +++ b/main/cov/src/cli/setnamecommand.cpp.gcov.html @@ -112,7 +112,7 @@ 24 : 25 286 : QStringList SetNameCommand::requiredOptions(const QCommandLineParser &parser) const 26 : { - 27 1144 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 27 936 : return DeviceCommand::requiredOptions(parser) + QStringList{ 28 : QLatin1String("new-name"), 29 728 : }; 30 156 : } diff --git a/main/cov/src/cli/settorchcommand.cpp.gcov.html b/main/cov/src/cli/settorchcommand.cpp.gcov.html index 3ff04c1ba..a21ad759a 100644 --- a/main/cov/src/cli/settorchcommand.cpp.gcov.html +++ b/main/cov/src/cli/settorchcommand.cpp.gcov.html @@ -111,7 +111,7 @@ 23 : 24 286 : QStringList SetTorchCommand::requiredOptions(const QCommandLineParser &parser) const 25 : { - 26 1144 : return DeviceCommand::requiredOptions(parser) + QStringList{ + 26 936 : return DeviceCommand::requiredOptions(parser) + QStringList{ 27 : QLatin1String("mode"), 28 728 : }; 29 156 : } diff --git a/main/cov/src/cli/statuscommand.cpp.gcov.html b/main/cov/src/cli/statuscommand.cpp.gcov.html index 592723071..5dfded649 100644 --- a/main/cov/src/cli/statuscommand.cpp.gcov.html +++ b/main/cov/src/cli/statuscommand.cpp.gcov.html @@ -204,16 +204,16 @@ 116 66 : case OutputFormat::Json: { 117 : QJsonObject battery{ 118 66 : { QLatin1String("level"), status.batteryVoltage }, - 119 198 : }; + 119 216 : }; 120 66 : if (!batteryLabel.isNull()) { 121 99 : battery.insert(QLatin1String("status"), batteryLabel); 122 : } 123 : QJsonObject object{ 124 24 : { QLatin1String("deviceName"), deviceName }, - 125 264 : { QLatin1String("firmwareVersion"), QJsonObject{ + 125 210 : { QLatin1String("firmwareVersion"), QJsonObject{ 126 48 : { QLatin1String("major"), chrs.firmwareVersion.majorVersion() }, 127 48 : { QLatin1String("minor"), chrs.firmwareVersion.minorVersion() }, - 128 132 : }}, + 128 204 : }}, 129 90 : { QLatin1String("maximumVoltage"), chrs.maximumVoltage }, 130 90 : { QLatin1String("maximumCurrent"), chrs.maximumCurrent }, 131 90 : { QLatin1String("maximumResistance"), chrs.maximumResistance }, @@ -221,12 +221,12 @@ 133 90 : { QLatin1String("samplingBufferSize"), chrs.samplingBufferSize }, 134 90 : { QLatin1String("capabilityMask"), chrs.capabilityMask }, 135 132 : { QLatin1String("macAddress"), chrs.macAddress.toString() }, - 136 264 : { QLatin1String("deviceStatus"), QJsonObject{ + 136 210 : { QLatin1String("deviceStatus"), QJsonObject{ 137 90 : { QLatin1String("code"), (quint8)status.deviceStatus }, 138 24 : { QLatin1String("label"), statusLabel }, - 139 132 : }}, + 139 204 : }}, 140 24 : { QLatin1String("battery"), battery }, - 141 882 : }; + 141 1134 : }; 142 66 : if (torchStatus) { 143 0 : object.insert(QStringLiteral("torchStatus"), QJsonObject{ 144 0 : { QLatin1String("code"), (quint8)*torchStatus }, @@ -280,7 +280,7 @@ 192 : break; 193 : } 194 198 : if (device) disconnect(); // Will exit the application once disconnected. - 195 1302 : } + 195 1212 : } diff --git a/main/cov/src/lib/abstractpokitservice.cpp.func.html b/main/cov/src/lib/abstractpokitservice.cpp.func.html index 89bbf1dfa..51c87845f 100644 --- a/main/cov/src/lib/abstractpokitservice.cpp.func.html +++ b/main/cov/src/lib/abstractpokitservice.cpp.func.html @@ -31,8 +31,8 @@ Dokit Lines: - 59.5 % - 195 + 58.9 % + 197 116 diff --git a/main/cov/src/lib/abstractpokitservice.cpp.gcov.html b/main/cov/src/lib/abstractpokitservice.cpp.gcov.html index 7fb988b55..df4d7fb9d 100644 --- a/main/cov/src/lib/abstractpokitservice.cpp.gcov.html +++ b/main/cov/src/lib/abstractpokitservice.cpp.gcov.html @@ -31,8 +31,8 @@ Dokit Lines: - 59.5 % - 195 + 58.9 % + 197 116 @@ -424,8 +424,8 @@ 336 : return false; 337 : } 338 : - 339 : QLowEnergyDescriptor descriptor = characteristic.descriptor( - 340 0 : QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration); + 339 0 : QLowEnergyDescriptor descriptor = characteristic.descriptor( + 340 0 : QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration); 341 0 : if (!descriptor.isValid()) { 342 0 : qCWarning(lc).noquote() << tr(R"(Characteristic %1 "%2" has no client configuration descriptor.)") 343 0 : .arg(uuid.toString(), PokitDevice::charcteristicToString(uuid)); @@ -459,8 +459,8 @@ 371 : return false; 372 : } 373 : - 374 : QLowEnergyDescriptor descriptor = characteristic.descriptor( - 375 0 : QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration); + 374 0 : QLowEnergyDescriptor descriptor = characteristic.descriptor( + 375 0 : QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration); 376 0 : if (!descriptor.isValid()) { 377 0 : qCWarning(lc).noquote() << tr(R"(Characteristic %1 "%2" has no client configuration descriptor.)") 378 0 : .arg(uuid.toString(), PokitDevice::charcteristicToString(uuid)); @@ -513,10 +513,10 @@ 425 572 : QString AbstractPokitServicePrivate::toHexString(const QByteArray &data, const int maxSize) 426 : { 427 208 : return (data.size() <= maxSize) - 428 1722 : ? QString::fromLatin1("0x%1").arg(QLatin1String(data.toHex(','))) - 429 66 : : QString::fromLatin1("0x%1,...,%2").arg( + 428 1725 : ? QString::fromLatin1("0x%1").arg(QLatin1String(data.toHex(','))) + 429 113 : : QString::fromLatin1("0x%1,...,%2").arg( 430 662 : QLatin1String(data.left(maxSize/2-1).toHex(',')), - 431 2336 : QLatin1String(data.right(maxSize/2-1).toHex(','))); + 431 2324 : QLatin1String(data.right(maxSize/2-1).toHex(','))); 432 : } 433 : 434 : /*! diff --git a/main/cov/src/lib/abstractpokitservice_p.h.gcov.html b/main/cov/src/lib/abstractpokitservice_p.h.gcov.html index 4e961d90e..b3cd9d42c 100644 --- a/main/cov/src/lib/abstractpokitservice_p.h.gcov.html +++ b/main/cov/src/lib/abstractpokitservice_p.h.gcov.html @@ -117,7 +117,7 @@ 29 462 : Q_OBJECT 30 : 31 : public: - 32 9626 : static Q_LOGGING_CATEGORY(lc, "pokit.ble.service", QtInfoMsg); ///< Logging category. + 32 9638 : static Q_LOGGING_CATEGORY(lc, "pokit.ble.service", QtInfoMsg); ///< Logging category. 33 : 34 : bool autoDiscover { true }; ///< Whether autodiscovery is enabled or not. 35 : QLowEnergyController * controller { nullptr }; ///< BLE controller to fetch the service from. diff --git a/main/cov/src/lib/index.html b/main/cov/src/lib/index.html index 8477a44ec..0badc1ce9 100644 --- a/main/cov/src/lib/index.html +++ b/main/cov/src/lib/index.html @@ -31,8 +31,8 @@ Dokit Lines: - 79.6 % - 1428 + 79.5 % + 1430 1137 @@ -108,10 +108,10 @@ abstractpokitservice.cpp -
59.5%59.5%
+
58.9%58.9%
- 59.5 % - 195 + 58.9 % + 197 116 83.3 % 30 diff --git a/main/cov/src/lib/pokitdevice.cpp.gcov.html b/main/cov/src/lib/pokitdevice.cpp.gcov.html index 28048758f..5cfaf7f62 100644 --- a/main/cov/src/lib/pokitdevice.cpp.gcov.html +++ b/main/cov/src/lib/pokitdevice.cpp.gcov.html @@ -204,7 +204,7 @@ 116 : */ 117 88 : CalibrationService * PokitDevice::calibration() 118 : { - 119 220 : QTPOKIT_INTERNAL_GET_SERVICE(CalibrationService, calibration); + 119 196 : QTPOKIT_INTERNAL_GET_SERVICE(CalibrationService, calibration); 120 : } 121 : 122 : /*! @@ -216,7 +216,7 @@ 128 : */ 129 88 : DataLoggerService * PokitDevice::dataLogger() 130 : { - 131 220 : QTPOKIT_INTERNAL_GET_SERVICE(DataLoggerService, dataLogger); + 131 196 : QTPOKIT_INTERNAL_GET_SERVICE(DataLoggerService, dataLogger); 132 : } 133 : 134 : /*! @@ -229,7 +229,7 @@ 141 : */ 142 496 : DeviceInfoService * PokitDevice::deviceInformation() 143 : { - 144 1240 : QTPOKIT_INTERNAL_GET_SERVICE(DeviceInfoService, deviceInfo); + 144 1132 : QTPOKIT_INTERNAL_GET_SERVICE(DeviceInfoService, deviceInfo); 145 : } 146 : 147 : /*! @@ -241,7 +241,7 @@ 153 : */ 154 88 : DsoService * PokitDevice::dso() 155 : { - 156 220 : QTPOKIT_INTERNAL_GET_SERVICE(DsoService, dso); + 156 196 : QTPOKIT_INTERNAL_GET_SERVICE(DsoService, dso); 157 : } 158 : 159 : /*! @@ -253,7 +253,7 @@ 165 : */ 166 88 : MultimeterService * PokitDevice::multimeter() 167 : { - 168 220 : QTPOKIT_INTERNAL_GET_SERVICE(MultimeterService, multimeter); + 168 196 : QTPOKIT_INTERNAL_GET_SERVICE(MultimeterService, multimeter); 169 : } 170 : 171 : /*! @@ -265,7 +265,7 @@ 177 : */ 178 308 : StatusService * PokitDevice::status() 179 : { - 180 770 : QTPOKIT_INTERNAL_GET_SERVICE(StatusService, status); + 180 686 : QTPOKIT_INTERNAL_GET_SERVICE(StatusService, status); 181 : } 182 : #undef QTPOKIT_INTERNAL_GET_SERVICE 183 : @@ -293,7 +293,7 @@ 205 : { QBluetoothUuid::ServiceClassUuid::GenericAttribute, 206 44 : QBluetoothUuid::serviceClassToString(QBluetoothUuid::ServiceClassUuid::GenericAttribute) }, 207 41 : { QBluetoothUuid(QStringLiteral("1d14d6ee-fd63-4fa1-bfa4-8f47b42119f0")), tr("OTA Firmware Update") }, - 208 484 : }; + 208 490 : }; 209 230 : return hash.value(uuid); 210 0 : } 211 : @@ -344,7 +344,7 @@ 256 : // The next two are not specifically supported by this library, but strings provided for nicer debug output. 257 41 : { QBluetoothUuid(QStringLiteral("f7bf3564-fb6d-4e53-88a4-5e37e0326063")), tr("OTA Control") }, 258 41 : { QBluetoothUuid(QStringLiteral("984227f3-34fc-4045-a5d0-2c581f81a153")), tr("OTA Data Transfer") }, - 259 1078 : }; + 259 1084 : }; 260 506 : return hash.value(uuid); 261 0 : } 262 : diff --git a/main/cov/src/lib/pokitdevice_p.h.gcov.html b/main/cov/src/lib/pokitdevice_p.h.gcov.html index f32f1055d..9377e3b46 100644 --- a/main/cov/src/lib/pokitdevice_p.h.gcov.html +++ b/main/cov/src/lib/pokitdevice_p.h.gcov.html @@ -121,7 +121,7 @@ 33 66 : Q_OBJECT 34 : 35 : public: - 36 2144 : static Q_LOGGING_CATEGORY(lc, "pokit.ble.controller", QtInfoMsg); ///< Logging category. + 36 2156 : static Q_LOGGING_CATEGORY(lc, "pokit.ble.controller", QtInfoMsg); ///< Logging category. 37 : 38 : QLowEnergyController * controller { nullptr }; ///< BLE controller for accessing the Pokit device. 39 : diff --git a/main/cov/src/lib/statusservice.cpp.gcov.html b/main/cov/src/lib/statusservice.cpp.gcov.html index 2749c8391..8fde87190 100644 --- a/main/cov/src/lib/statusservice.cpp.gcov.html +++ b/main/cov/src/lib/statusservice.cpp.gcov.html @@ -682,7 +682,7 @@ 594 : } 595 : 596 44 : characteristics.firmwareVersion = QVersionNumber( - 597 88 : qFromLittleEndian<quint8 >(value.mid(0,1).constData()), + 597 76 : qFromLittleEndian<quint8 >(value.mid(0,1).constData()), 598 72 : qFromLittleEndian<quint8 >(value.mid(1,1).constData())); 599 60 : characteristics.maximumVoltage = qFromLittleEndian<quint16>(value.mid(2,2).constData()); 600 60 : characteristics.maximumCurrent = qFromLittleEndian<quint16>(value.mid(4,2).constData()); @@ -690,8 +690,8 @@ 602 62 : characteristics.maximumSamplingRate = qFromLittleEndian<quint16>(value.mid(8,2).constData()); 603 60 : characteristics.samplingBufferSize = qFromLittleEndian<quint16>(value.mid(10,2).constData()); 604 60 : characteristics.capabilityMask = qFromLittleEndian<quint16>(value.mid(12,2).constData()); - 605 72 : characteristics.macAddress = QBluetoothAddress(qFromBigEndian<quint64> - 606 126 : ((QByteArray(2, '\0') + value.mid(14,6)).constData())); + 605 60 : characteristics.macAddress = QBluetoothAddress(qFromBigEndian<quint64> + 606 114 : ((QByteArray(2, '\0') + value.mid(14,6)).constData())); 607 : 608 52 : qCDebug(lc).noquote() << tr("Firmware version: ") << characteristics.firmwareVersion; 609 52 : qCDebug(lc).noquote() << tr("Maximum voltage: ") << characteristics.maximumVoltage;