Skip to content

Commit a31926a

Browse files
authored
Create piusv.html
1 parent 46b876a commit a31926a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

piusv/sv_widgets/piusv.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* -----------------------------------------------------------------------------
3+
* @package smartVISU
4+
* @author Wolfram v. Hülsen
5+
* @copyright 2018 - 2024
6+
* @license GPL [http://www.gnu.de]
7+
* -----------------------------------------------------------------------------
8+
*/
9+
10+
/**
11+
* Displays the status of the PiUSV
12+
*
13+
* @param {id=} unique id for this widget(optional)
14+
* @param {item} main item path for piusv struct
15+
*
16+
*/
17+
18+
{% macro info(id, item) %}
19+
{% import config_version_full >= "3.2.c" ? "@widgets/basic.html" : "basic.html" as basic %}
20+
<style>
21+
.small-led>.symbol svg {
22+
width:18px!important;
23+
height:18px!important;
24+
vertical-align: top;
25+
margin-top: 2px;
26+
}
27+
td.text_label {
28+
width: 32%;
29+
overflow: hidden;
30+
text-overflow: ellipsis;
31+
}
32+
</style>
33+
<table style="min-width: 40%;">
34+
<tr style="display:flex;">
35+
<td class="text_label">Versorgungsspannung:</td>
36+
<td style="width:15%;">{{basic.print('', item~'.u_ext', '%01,3f V','VAR1/1000' ) }}</td>
37+
<td class="text_label">Batteriespannung:</td>
38+
<td style="width:15%;">{{basic.print('', item~'.u_batt', '%01,3f V','VAR1/1000') }}</td>
39+
</tr>
40+
<tr style="display:flex;">
41+
<td class="text_label">Spannung RPI:</td>
42+
<td style="width:15%;">{{basic.print('', item~'.u_rasp', '%01,3f V','VAR1/1000' ) }}</td>
43+
<td class="text_label">Strom RPI:</td>
44+
<td style="width:15%;">{{basic.print('', item~'.i_rasp', 'mA' ) }}</td>
45+
</tr>
46+
</table>
47+
<br/>
48+
<span class="small-led">{{ basic.symbol('', item~'.piusv_status', '', 'status_led', [0,1], 'VAR1 & 1', ['#C80101', '#01A001']) }}</span>Externe Versorgung<br>
49+
<span class="small-led">{{ basic.symbol('', item~'.piusv_status', '', 'status_led', [0,2], 'VAR1 & 2', ['lightgrey', '#01A001']) }}</span>Batteriebetrieb<br>
50+
<span class="small-led">{{ basic.symbol('', item~'.piusv_status', '', 'status_led', [0,4], 'VAR1 & 4', ['lightgray', '#C80101']) }}</span>Batterie niedrig<br>
51+
<span class="small-led">{{ basic.symbol('', item~'.piusv_status', '', 'status_led', [0,8], 'VAR1 & 8', ['lightgray', '#01A001']) }}</span>Batterie laden<br>
52+
<span class="small-led">{{ basic.symbol('', item~'.piusv_status', '', 'status_led', [0,16], 'VAR1 & 16', ['#C80101', '#01A001']) }}</span>Batterie voll<br>
53+
54+
{% endmacro %}

0 commit comments

Comments
 (0)