blob: f168e105d9218f604b47580634c119074c25b2c5 [file] [log] [blame]
Patrick Venturee6206562018-03-08 15:36:53 -08001## This file is a template. The comment below is emitted
2## into the rendered file; feel free to edit this file.
3
4// !!! WARNING: This is GENERATED Code... Please do NOT edit !!!
5
6#include <map>
7#include "conf.hpp"
8
9std::map<int64_t, PIDConf> ZoneConfig = {
10% for zone in PIDDict.iterkeys():
11 % if zone:
12 {${zone},
13 {
14 % for key, details in PIDDict[zone].iteritems():
15 {"${key}",
16 {"${details['type']}",
17 {
18 % for item in details['inputs'].split():
19 "${item}",
20 % endfor
21 },
22 <%
23 # If the PID type is a fan, set-point field is unused,
24 # so just use a default of 0. If the PID is not a type
25 # of fan, require the set-point field.
26 if 'fan' == details['type']:
27 setpoint = 0
28 else:
29 setpoint = details['set-point']
30 %>
31 ${setpoint},
32 {${details['pid']['sampleperiod']},
33 ${details['pid']['p_coefficient']},
34 ${details['pid']['i_coefficient']},
35 ${details['pid']['ff_off_coefficient']},
36 ${details['pid']['ff_gain_coefficient']},
37 {${details['pid']['i_limit']['min']}, ${details['pid']['i_limit']['max']}},
38 {${details['pid']['out_limit']['min']}, ${details['pid']['out_limit']['max']}},
39 ${details['pid']['slew_neg']},
40 ${details['pid']['slew_pos']}},
41 },
42 },
43 % endfor
44 },
45 },
46 % endif
47% endfor
48};