adding VFD

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3874 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2017-03-01 20:54:28 +00:00
parent 14f4eb0371
commit 44814fb791
9 changed files with 84 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.4.0-13
Version: 1.4.0-14
Architecture: mipsel
Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.25),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.10),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1)

View File

@ -352,7 +352,9 @@ foreach event $events {
# VFD
if {[file exists /tmp/.vfd] && $runmode ne "cgi"} {
lappend output "VFD: [file read /tmp/.vfd]"
lappend output "VFD: [string map {
\13 ">"
} [file read /tmp/.vfd]]"
}
######################################################################

14
webif/cgi-bin/vfd.jim Executable file
View File

@ -0,0 +1,14 @@
#!/mod/bin/jimsh
source /mod/webif/lib/setup
httpheader
if {[file exists /tmp/.vfd]} {
puts [string map {
\13 ►
} [file read /tmp/.vfd]]
} else {
puts ""
}

View File

@ -3,3 +3,13 @@
* It will not be overwritten on webif updates.
*/
/* The examples below can be uncommented if required. */
/* Hide the VFD display */
/* #vfd { display: none; } */
/* Hide the Idle time */
/* #idletime { display: none; } */

View File

@ -1,3 +1,9 @@
@font-face
{
font-family: vfd;
src: url(/lib/font/vfd.ttf);
}
html body
{
line-height: 1.55em;
@ -75,6 +81,21 @@ div.container .usb
top: 8px;
}
div.container .vfd
{
position: absolute;
left: 200px;
top: 55px;
}
#vfd div
{
background: #444;
color: #1bd1b0;
font-size: 20px;
padding: 5px;
}
#idletime
{
position: absolute;
@ -677,3 +698,9 @@ a.breadcrumb:hover
color: #008080;
}
.vfd
{
font-family: vfd, 'Lucida Console', Monaco, monospace;
color: #1bd1b0;
}

View File

@ -20,5 +20,19 @@ function updateidle()
updateidle();
setInterval(updateidle, 60000);
if ($('#vfd').length)
{
function updatevfd()
{
$.get('/cgi-bin/vfd.jim', function(vfd) {
$('#vfd div').html(vfd);
});
}
updatevfd();
setInterval(updatevfd, 5000);
}
});

BIN
webif/html/lib/font/vfd.ttf Normal file

Binary file not shown.

View File

@ -27,6 +27,7 @@ puts {
if {[system model] eq "HDR" && [system usbdisks] > 0} {
source /mod/webif/include/usbeject.jim
}
source /mod/webif/include/vfd.jim
puts {
<div id=idletime></div>
</div>

14
webif/include/vfd.jim Executable file
View File

@ -0,0 +1,14 @@
#!/mod/bin/jimsh
source /mod/webif/lib/setup
if {[file exists "/tmp/.vfd"]} {
puts {
<div id=vfd>
<div class=vfd>
Loading...
</div>
</div>
}
}