Skip to content

Commit

Permalink
Clarify some code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Dec 29, 2023
1 parent 8273daf commit 8c72853
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/statusservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,9 @@ StatusService::Status StatusServicePrivate::parseStatus(const QByteArray &value)
/*!
* \pokitApi Pokit API 0.02 says the `Status` characteristic is 5 bytes. API 1.00 then added an
* additional byte for `Battery Status`, for 6 bytes in total. However, Pokit Pro devices return
* 8 bytes here. It appears that the first of those 2 extra bytes is used to indicate the physical
* switch position, while the other extra byte indicates the device's current charging status.
* 8 bytes here. It appears that the first of those 2 extra bytes (ie the 7th byte) is used to
* indicate the physical switch position, while the other extra byte (ie the 8th byte) indicates
* the device's current charging status.
*/

if (!checkSize(QLatin1String("Status"), value, 5, 8)) {
Expand Down

0 comments on commit 8c72853

Please sign in to comment.