Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. What causes a QSensor to be unable to connect to a sensor backend?

What causes a QSensor to be unable to connect to a sensor backend?

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 642 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mchen76
    wrote on last edited by
    #1

    I'm developing a C++ program to output accelerometer values to terminal on the Nexus 4 running Ubuntu Touch. However, when I run it on device, it gives me dummy values (x = 0, y = 9.8, z = 0).

    sensorsForType(QAccelerometer) gives me:
    core.accelerometer
    dummy.accelerometer

    defaultSensorForType is:
    core.accelerometer

    When I create an Accelerometer and check its identifier, it is dummy.accelerometer and I get the dummy values. If I set the identifier to core.accelerometer, the start() function returns 0 and as a result, isConnectedToBackend() is false.

    I suspect the backend couldn't be created and returned 0 but I'm not sure. isBackendRegistered() shows that core.accelerometer is registered. I couldn't seem to find any other debugging functions and I'm stumped at how to proceed, can someone advise on what to do next?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can use QT_DEBUG_PLUGINS=1 to see what happens with the plugins.

      However my first guess would be that ubuntu touch doesn't have a backend yet for Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved