43 this->valve_run_duration_.optional_value(x...));
81 this->valve_run_duration_.optional_value(x...));
117 this->valve_run_duration_.optional_value(x...));
void set_repeat(optional< uint32_t > repeat)
set the number of times to repeat a full cycle
void play(Ts... x) override
void play(Ts... x) override
void previous_valve()
advances to the previous valve (numerically)
NextValveAction(Sprinkler *a_sprinkler)
void next_valve()
advances to the next valve (numerically)
void queue_valve(optional< size_t > valve_number, optional< uint32_t > run_duration)
adds a valve into the queue.
void set_divider(optional< uint32_t > divider)
sets the multiplier value to '1 / divider' and sets repeat value to divider
void play(Ts... x) override
SetDividerAction(Sprinkler *a_sprinkler)
void play(Ts... x) override
void set_multiplier(optional< float > multiplier)
value multiplied by configured run times – used to extend or shorten the cycle
void play(Ts... x) override
void play(Ts... x) override
void shutdown(bool clear_queue=false)
turns off all valves, effectively shutting down the system.
void set_valve_run_duration(optional< size_t > valve_number, optional< uint32_t > run_duration)
set how long the valve should remain on/open. run_duration is time in seconds
ClearQueuedValvesAction(Sprinkler *a_sprinkler)
SetRunDurationAction(Sprinkler *a_sprinkler)
void resume_or_start_full_cycle()
if a cycle was suspended using pause(), resumes it. otherwise calls start_full_cycle() ...
PauseAction(Sprinkler *a_sprinkler)
QueueValveAction(Sprinkler *a_sprinkler)
StartSingleValveAction(Sprinkler *a_sprinkler)
void resume()
resumes a cycle that was suspended using pause()
void pause()
same as shutdown(), but also stores active_valve() and time_remaining() allowing resume() to continue...
void start_full_cycle()
starts a full cycle of all enabled valves and enables auto_advance.
TEMPLATABLE_VALUE(uint32_t, repeat) void play(Ts... x) override
void play(Ts... x) override
SetRepeatAction(Sprinkler *a_sprinkler)
TEMPLATABLE_VALUE(float, multiplier) void play(Ts... x) override
void start_from_queue()
starts the controller from the first valve in the queue and disables auto_advance.
TEMPLATABLE_VALUE(uint32_t, divider) void play(Ts... x) override
void clear_queued_valves()
clears/removes all valves from the queue
Implementation of SPI Controller mode.
void play(Ts... x) override
ResumeOrStartAction(Sprinkler *a_sprinkler)
PreviousValveAction(Sprinkler *a_sprinkler)
StartFromQueueAction(Sprinkler *a_sprinkler)
void play(Ts... x) override
SetMultiplierAction(Sprinkler *a_sprinkler)
ShutdownAction(Sprinkler *a_sprinkler)
void start_single_valve(optional< size_t > valve_number, optional< uint32_t > run_duration=nullopt)
activates a single valve and disables auto_advance.
ResumeAction(Sprinkler *a_sprinkler)
virtual void play(Ts... x)=0
StartFullCycleAction(Sprinkler *a_sprinkler)