From eb0a23d82cd06f961dcd4e4731410d31729f7b37 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sat, 18 Mar 2017 10:42:17 +0000 Subject: [PATCH] Use new redring API for retrieving VFD text --- webif/cgi-bin/status.jim | 7 +++---- webif/cgi-bin/vfd.jim | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/webif/cgi-bin/status.jim b/webif/cgi-bin/status.jim index 8472511..49e9fee 100755 --- a/webif/cgi-bin/status.jim +++ b/webif/cgi-bin/status.jim @@ -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]" } ###################################################################### diff --git a/webif/cgi-bin/vfd.jim b/webif/cgi-bin/vfd.jim index 0baffe0..12475fc 100755 --- a/webif/cgi-bin/vfd.jim +++ b/webif/cgi-bin/vfd.jim @@ -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] +