-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.php
230 lines (225 loc) · 17.4 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<div id="fanspeed" class="tab-pane fade<?php if($tab === "fanspeed"){ ?> in active<?php } ?>">
<div class="row">
<div class="col-lg-6">
<div class="box box-warning">
<div class="box-header with-border">
<h1 class="box-title">Current Speed/Temp</h1>
</div>
<div class="box-body">
<div class="row">
<div class="col-sm-12">
<table class="table table-bordered">
<tr>
<th scope="row">Temp</th>
<td colspan="3">
<?php $output = shell_exec('xxd -s1 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
</tr>
<tr>
<th scope="row">Fanspeed</th>
<td colspan="3">
<?php $output = shell_exec('xxd -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)."%"; ?>
</td>
</tr>
<tr>
<th scope="row">Temp/Fan 0</th>
<td>
<?php $output = shell_exec('xxd -s5 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
<td>
<?php $output = shell_exec('xxd -s2 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)."%"; ?>
</td>
</tr>
<tr>
<th scope="row">Temp/Fan 1</th>
<td>
<?php $output = shell_exec('xxd -s6 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
<td>
<?php $output = shell_exec('xxd -s3 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)."%"; ?>
</td>
</tr>
<tr>
<th scope="row">Temp/Fan 2</th>
<td>
<?php $output = shell_exec('xxd -s7 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
<td>
<?php $output = shell_exec('xxd -s4 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)."%"; ?>
</td>
</tr>
<tr>
<th scope="row">Target Temp</th>
<td colspan="3">
<?php $output = shell_exec('xxd -s10 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
</tr>
<tr>
<th scope="row">Fan Speed Override</th>
<td colspan="3">
<?php $output = shell_exec('xxd -s11 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)."%"; ?>
</td>
</tr>
<tr>
<th scope="row">Hysteresis</th>
<td colspan="3">
<?php $output = shell_exec('xxd -s8 -l 1 /dev/shm/argonone | cut -d " " -f2'); echo hexdec($output)." °C"; ?>
</td>
</tr>
<tr>
<th scope="row">Fan mode</th>
<td colspan="3">
<?php $output = shell_exec('xxd -s9 -l 1 /dev/shm/argonone | cut -d " " -f2'); $fmode = hexdec($output); if ($fmode == 0) $fmode = "Auto"; if ($fmode == 1) $fmode = "Off"; if ($fmode == 2) $fmode = "Manual"; if ($fmode == 3) $fmode = "Cooldown"; echo $fmode;?>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<form role="form" method="post">
<input type="hidden" name="fanfield" value="fanspeed">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="box box-warning">
<div class="box-header with-border">
<h1 class="box-title">Change Fanspeed Settings</h1>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6">
<strong>Temp 0</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="temp0" class="form-control" min="0" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Temp setting 0 eg. 55">
</div>
</div>
</div>
<div class="col-md-6">
<strong>Fanspeed 0</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="fan0" class="form-control" min="10" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Fanspeed setting 0 eg. 10">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<strong>Temp 1</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="temp1" class="form-control" min="0" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Temp setting 1 eg. 60">
</div>
</div>
</div>
<div class="col-md-6">
<strong>Fanspeed 1</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="fan1" class="form-control" min="10" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Fanspeed setting 1 eg. 55">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<strong>Temp 2</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="temp2" class="form-control" min="0" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Temp setting 2 eg. 65">
</div>
</div>
</div>
<div class="col-md-6">
<strong>Fanspeed 2</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="fan2" class="form-control" min="10" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Fanspeed setting 2 eg. 100">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<strong>Hysteresis</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="hysteresis" class="form-control" min="0" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Hysteresis temp eg. 3">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<strong>Cooldown Mode</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="cooldowntemp" class="form-control" min="0" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Temp to reach to eg. 50">
</div>
</div>
</div>
<div class="col-md-6">
<strong>Option Fanspeed</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="cooldownfan" class="form-control" min="10" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="If not set 10% is used. eg. 20">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<strong>Manual Mode</strong>
<div class="row">
<div class="col-md-11">
<input type="number" name="manual" class="form-control" min="10" max="100" autocomplete="off" spellcheck="false" autocapitalize="none" autocorrect="off" placeholder="Manually set fanspeed eg. 50">
</div>
</div>
</div>
</div>
<div class="box-footer clearfix">
<input type="hidden" name="fanfield" value="fanspeed">
<input type="hidden" name="token" value="<?php echo $token ?>">
<button type="submit" class="btn btn-primary pull-right">Save</button>
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-md-12">
<div class="box box-warning">
<div class="box-body">
<div class="row">
<div class="col-md-4">
<button type="submit" class="btn btn-success confirm-fanauto btn-block">Argononed Auto</button>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="submit" class="btn btn-warning confirm-fanoff btn-block">Argononed Off</button>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="submit" class="btn btn-danger confirm-clearfandb btn-block">Clear Database</button>
</div>
</div>
<form role="form" method="post" id="fanautoform">
<input type="hidden" name="fanfield" value="fanauto">
<input type="hidden" name="token" value="<?php echo $token ?>">
</form>
<form role="form" method="post" id="fanoffform">
<input type="hidden" name="fanfield" value="fanoff">
<input type="hidden" name="token" value="<?php echo $token ?>">
</form>
<form role="form" method="post" id="clearfandbform">
<input type="hidden" name="fanfield" value="clearfandb">
<input type="hidden" name="token" value="<?php echo $token ?>">
</form>
</div>
</div>
</div>
</div>
</div>
</div>