Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62421

QSerialBus Modbus master example: read address is not incremented

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.9.1
    • Fix Version/s: 5.9.2
    • Component/s: SerialBus: MOD Bus
    • Labels:
      None

      Description

      In the Modbus Master example, in this file :

      http://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/modbus/master/mainwindow.cpp

      Line 246, the address before displaying the value is not incremented.

      Replace:

      for (uint i = 0; i < unit.valueCount(); i++) { const QString entry = tr("Address: %1, Value: %2").arg(unit.startAddress())

      with:

      for (uint i = 0; i < unit.valueCount(); i++) { const QString entry = tr("Address: %1, Value: %2").arg(unit.startAddress() + i){{}}

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            ablasche Alex Blasche
            Reporter:
            arabine Anthony Rabine
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes