Use new redring API for retrieving VFD text

This commit is contained in:
HummyPkg 2017-03-18 10:42:17 +00:00
parent 2c9a386e25
commit eb0a23d82c
2 changed files with 8 additions and 9 deletions

View File

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

View File

@ -4,11 +4,11 @@ source /mod/webif/lib/setup
httpheader
if {[file exists /tmp/.vfd]} {
puts [string map {
\13 ►
} [file read /tmp/.vfd]]
} else {
if {![file exists /mod/webif/plugin/redring/lib.jim]} {
puts ""
exit
}
source /mod/webif/plugin/redring/lib.jim
puts [::redring::vfd 1]