Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-466

QCompass does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P1: Critical P1: Critical
    • None
    • 1.0.0
    • Sensors

      Run a very simple program which uses QCompass:

      #include <QtCore>
      #include <QCompass>
      QTM_USE_NAMESPACE
      class Filter : public QCompassFilter
      {
      public:
          bool filter(QCompassReading *pReading)
          {
              qDebug() << "Compass Calibration Level:" << pReading->calibrationLevel() << "Azimuth:" << pReading->azimuth();
              return false; // don't store the reading in the sensor
          }
      };
      int main(int argc, char **argv)
      {
          QCoreApplication app(argc, argv);
          QCompass compass;
          Filter filter;
          compass.addFilter(&filter);
          compass.start();
          if (!compass.isActive()) {
              qWarning("Compass did not start!");
              return 1;
          }
          return app.exec();
      }
      

      Expected result: Azimuth info should be printed to the console when rotating the device.
      Actual result: The following is printed in the console:

      Setting up compass (0.0.1) ...
      loaded the Generic plugin
      loaded the Maemo 6 plugin
      New control sensor "compasssensor" interface created with session id 8 ...
      Object::connect: No such signal CompassSensorChannelInterface::levelChanged(const int&) in maemo6compass.cpp:56
      Object::connect: No such signal CompassSensorChannelInterface::degreesChanged(const int&) in maemo6compass.cpp:57
      Setting data rate 43 Hz (interval 23 ms) for "compasssensor"
      

      and no azimuth info is reported.

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

            p2niemel pia
            lramsay Lincoln Ramsay (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes