This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
qEcho/source/distancethread.h

24 lines
335 B
C
Raw Normal View History

2017-10-15 10:30:15 +00:00
#pragma once
#include "hcsr04.h"
2017-10-15 10:30:15 +00:00
#include <QThread>
class DistanceThread : public QThread
{
Q_OBJECT
private:
HCSR04 m_hcsr04;
2017-10-15 10:30:15 +00:00
public:
DistanceThread() = delete;
DistanceThread(unsigned int triggerPin, unsigned int echoPin);
2017-10-15 10:30:15 +00:00
protected:
void run() override;
signals:
void distanceUpdated(double distMeters);
};