supla-device
Loading...
Searching...
No Matches
correction.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_CORRECTION_H_
5#define SRC_SUPLA_CORRECTION_H_
6
7#include <stdint.h>
8
9namespace Supla {
10
12 public:
13 static void add(uint8_t channelNumber,
14 double correction,
15 bool forSecondaryValue = false);
16 static double get(uint8_t channelNumber, bool forSecondaryValue = false);
17 static Correction *getInstance(uint8_t channelNumber,
18 bool forSecondaryValue = false);
19 static void clear();
20
21 protected:
22 Correction(uint8_t channelNumber, double correction, bool forSecondaryValue);
24
25 static Correction *first;
26
27 double correction = 0;
28 Correction *next = nullptr;
29
30 uint8_t channelNumber = 0;
31 bool forSecondaryValue = false;
32};
33
34}; // namespace Supla
35
36#endif // SRC_SUPLA_CORRECTION_H_
Definition correction.h:11