supla-device
Loading...
Searching...
No Matches
src
supla
sensor
distance.h
1
// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2
// SPDX-License-Identifier: GPL-2.0-or-later
3
4
#ifndef SRC_SUPLA_SENSOR_DISTANCE_H_
5
#define SRC_SUPLA_SENSOR_DISTANCE_H_
6
7
#include "supla/channel_element.h"
8
9
#define DISTANCE_NOT_AVAILABLE -1.0
10
11
namespace
Supla {
12
namespace
Sensor {
13
class
Distance
:
public
ChannelElement
{
14
public
:
15
Distance
();
16
17
virtual
double
getValue();
18
virtual
void
setReadIntervalMs(uint32_t timeMs);
19
20
void
iterateAlways
()
override
;
21
22
protected
:
23
uint32_t lastReadTime = 0;
24
uint32_t readIntervalMs = 100;
25
};
26
27
};
// namespace Sensor
28
};
// namespace Supla
29
30
#endif
// SRC_SUPLA_SENSOR_DISTANCE_H_
Supla::ChannelElement
Definition
channel_element.h:15
Supla::Sensor::Distance
Definition
distance.h:13
Supla::Sensor::Distance::iterateAlways
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition
distance.cpp:17
Generated by
1.12.0