Commit d2c6cb39 authored by Csaba Kertész's avatar Csaba Kertész Committed by Jasem Mutlaq

Fix automatic mode in KStars Lite

parent c692f301
......@@ -152,7 +152,7 @@ SkyMapLite::SkyMapLite()
});
#if defined (Q_OS_ANDROID)
//Automatic mode
automaticModeTimer.setInterval(1);
automaticModeTimer.setInterval(5);
connect(&automaticModeTimer, SIGNAL(timeout()), this, SLOT(updateAutomaticMode()));
setAutomaticMode(false);
#endif
......@@ -989,14 +989,14 @@ void SkyMapLite::setAutomaticMode(bool automaticMode)
#endif
}
#if defined(Q_OS_ANDROID)
void SkyMapLite::updateAutomaticMode()
{
#if defined(Q_OS_ANDROID)
m_deviceOrientation->getOrientation();
setFocusAltAz(dms(m_deviceOrientation->getAltitude()), dms(m_deviceOrientation->getAzimuth()));
setSkyRotation(-1 * m_deviceOrientation->getRoll());
}
#endif
}
void SkyMapLite::initStarImages()
{
......
......@@ -516,11 +516,10 @@ class SkyMapLite : public QQuickItem
*/
void slotSelectObject(SkyObject * skyObj);
#if defined(Q_OS_ANDROID)
/** @short updates focus of SkyMapLite according to data from DeviceOrientation
(Smartphone's sensors)*/
void updateAutomaticMode();
#endif
void setSkyRotation(double skyRotation);
signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment