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

QCompass does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 1.0.0
    • Sensors
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: