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++

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