James Feist | ce6a3f3 | 2019-03-12 11:20:16 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "pid/zone.hpp" |
| 4 | |
| 5 | #include <boost/asio/steady_timer.hpp> |
| 6 | |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 7 | namespace pid_control |
| 8 | { |
| 9 | |
James Feist | ce6a3f3 | 2019-03-12 11:20:16 -0700 | [diff] [blame] | 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 PIDZone for this loop. |
| 16 | * @param[in] timer - boost timer used for async callback. |
| 17 | * @param[in] first - boolean to denote if initialization needs to be run. |
| 18 | * @param[in] ms100cnt - loop timer counter. |
| 19 | */ |
| 20 | void pidControlLoop(PIDZone* zone, boost::asio::steady_timer& timer, |
| 21 | bool first = true, int ms100cnt = 0); |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 22 | |
| 23 | } // namespace pid_control |