Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
SetpointProfileRunner.h
Go to the documentation of this file.
1#ifndef FIRMWARE_SETPOINTPROFILERUNNER_H
2#define FIRMWARE_SETPOINTPROFILERUNNER_H
3
4#include <etl/span.h>
5
6#include "Point.h"
8
11private:
13 etl::span<const Point> profile;
14 uint32_t timeStart;
15 bool running = false;
16public:
20
22 void toggle();
23
26 void setProfile(const etl::span<const Point>& profile);
27
30 void update();
31
34 [[nodiscard]] bool isRunning() const;
35
38 [[nodiscard]] size_t getCurrentPoint() const;
39};
40
41
42#endif //FIRMWARE_SETPOINTPROFILERUNNER_H
Base class for a humidistat. Holds a reference to a HumiditySensor instance.
Definition Humidistat.h:10
'Runs' a setpoint profile.
void update()
Run the profile (if running). Call this periodically.
void setProfile(const etl::span< const Point > &profile)
Set the profile.
bool isRunning() const
Get the run state.
size_t getCurrentPoint() const
Get the index of the current Point in the profile.
void toggle()
Toggle the run state.
SetpointProfileRunner(Humidistat *humidistat)
Constructor.
etl::span< const Point > profile