#pragma once

#include <QTimer>

#include "sun.h"
#include "sensor.h"


class SunSensorSource : public QObject
{
	Q_OBJECT
private:

	Sun sun_;
	QTimer timer;

public:
	explicit SunSensorSource(double lat, double lon, QObject *parent = nullptr);

public slots:
	void run();
	void abort();

signals:
	void stateChanged(Sensor sensor, sensor_update_type_t type = SENSOR_UPDATE_BACKEND);

private slots:
	void doTick();
};
