1 #pragma once
2 
3 #include "pid/zone_interface.hpp"
4 
5 #include <boost/asio/steady_timer.hpp>
6 
7 namespace pid_control
8 {
9 
10 /**
11  * Main pid control loop for a given zone.
12  * This function calls itself indefinitely in an async loop to calculate
13  * fan outputs based on thermal inputs.
14  *
15  * @param[in] zone - ptr to the ZoneInterface implementation for this loop.
16  * @param[in] timer - boost timer used for async callback.
17  * @param[in] isCanceling - bool ptr to indicate whether pidControlLoop is being
18  * canceled.
19  * @param[in] first - boolean to denote if initialization needs to be run.
20  * @param[in] ms100cnt - loop timer counter.
21  */
22 void pidControlLoop(std::shared_ptr<ZoneInterface> zone,
23                     std::shared_ptr<boost::asio::steady_timer> timer,
24                     const bool* isCanceling, bool first = true,
25                     int ms100cnt = 0);
26 
27 } // namespace pid_control
28