Results 1 to 8 of 8

Thread: Regarding Bluetooth Low energy Heart Listener example

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Aug 2016
    Posts
    14
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Smile Re: Regarding Bluetooth Low energy Heart Listener example

    I am going to use QtCustomPlot for the same, however, I had a small query (would apologise if this sounds simple and irrelevant to most of the users, however, I'm using Qt for the first time and have been struggling since quite a few days to figure out things)
    So below is the query: I tried executing below mentioned function (picked up from the heartrate.cpp file)
    void ADCReader::updateHeartRateValue(const QLowEnergyCharacteristic &c,
    const QByteArray &value)
    {
    // ignore any other characteristic change -> shouldn't really happen though
    if (c.uuid() != QBluetoothUuid(QBluetoothUuid::HeartRateMeasuremen t))
    return;
    const quint8 *data = reinterpret_cast<const quint8 *>(value.constData());
    quint8 flags = data[0];
    }


    And on passing the numbers from 90 to 110, got the output as mentioned below:
    value,16
    value,144
    value,145
    value,146
    value,147
    value,148
    value,149
    value,150
    value,151
    value,152
    value,153
    value,16
    value,16
    value,16
    value,16
    value,16
    value,16
    value,16
    value,16
    value,16
    value,16.

    I think it is little endian format, but I am not sure about the series of 16 displayed in the output. Would be really helpful if someone would be able to explain the reason for getting this type of output.

    EDIT: I got the output after inserting
    QString s = value.toHex();
    Last edited by user03; 21st August 2016 at 18:19.

Similar Threads

  1. Replies: 2
    Last Post: 17th May 2016, 11:33
  2. Bluetooth Low Energy
    By flemingp in forum Newbie
    Replies: 0
    Last Post: 4th May 2016, 21:01
  3. How to send and receive data with Eluetooth Low Energy?
    By tanthinh1510 in forum Qt Programming
    Replies: 0
    Last Post: 5th April 2016, 03:10
  4. UDP Listener
    By ricarlc in forum Newbie
    Replies: 6
    Last Post: 13th January 2014, 20:14

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.