mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Fixed usleep windows compile problem
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1934 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
dc10998152
commit
3a2fe4587d
@ -34,12 +34,26 @@
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QThread>
|
||||
|
||||
#define sign(x) ((x < 0) ? -1 : 1)
|
||||
|
||||
const double ConfigAHRSWidget::maxVarValue = 0.1;
|
||||
const int ConfigAHRSWidget::calibrationDelay = 7; // Time to wait for the AHRS to do its calibration
|
||||
|
||||
// *****************
|
||||
|
||||
class Thread : public QThread
|
||||
{
|
||||
public:
|
||||
static void usleep(unsigned long usecs)
|
||||
{
|
||||
QThread::usleep(usecs);
|
||||
}
|
||||
};
|
||||
|
||||
// *****************
|
||||
|
||||
ConfigAHRSWidget::ConfigAHRSWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_ahrs = new Ui_AHRSWidget();
|
||||
@ -582,7 +596,7 @@ void ConfigAHRSWidget::sixPointCalibrationMode()
|
||||
|
||||
obj->updated();
|
||||
|
||||
usleep(100000);
|
||||
Thread::usleep(100000);
|
||||
|
||||
gyro_accum_x.clear();
|
||||
gyro_accum_y.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user