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

PositionSource update() doesn't work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.7.0
    • Positioning
    • Qt 5.7.0, Android, iOS

    Description

      To get a single Position from documentation update() should be used.
      I'm getting the Position, but it took always around 2 minutes to get positionUpdated SIGNAL.

      workaround:
      set updateInterval to 5000
      use start() instead of update()
      and when getting first positionUpdate stop()
      then the position was delivered immediately

      // positionSource.update(): 2 minutes to get first positionChanged()
      // positionSource.start(): 2 seco0nds or so
              PositionSource {
                  id: positionSource
                  updateInterval: 5000
                  onPositionChanged: {
      				// do something with position.coordinate
      				// stop here if start() was used to get single position
                      stop()
                  }
                  onSourceErrorChanged: {
                      if (sourceError == PositionSource.NoError) {
                          console.log ("NO ERROR")
                          return
                      }
                      console.log("Source error: " + sourceError + " is GPS ON ?")
                      active = false
                  }
                  onUpdateTimeout: {
                      console.log ("TIMEOUT POSITION Source")
                      active = false
                  }
              } // positionSource
      

      Attachments

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

        Activity

          People

            ablasche Alex Blasche
            ekkescorner Ekkehard
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes